Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
//using System.Numerics; using System.Collections; using System.Collections.Generic; using UnityEngine; public abstract class PlayerState { protected Player player; protected Animator anim; protected Rigidbody2D rb; protected Combat combat; protected bool JumpPressed { get => player.jumpPressed; set => player.jumpPressed = value; } protected bool JumpReleased { get => player.jumpReleased; set => player.jumpReleased = value; } protected bool RunPressed => player.runPressed; protected bool AttackPressed => player.attackPressed; protected Vector2 MoveInput => player.moveInput; public PlayerState(Player player) { this.player = player; this.anim = player.anim; // this.rb = player.rb ?? player.GetComponent
(); this.rb = player.rb; this.combat = player.combat; } public virtual void Enter() { } public virtual void Exit() { } public virtual void Update() { } public virtual void FixedUpdate() { } public virtual void AttackAnimationFinished() { } }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)