public Move(GameObject actor, Rigidbody2D actorRb, GroundCheck groundCheck, ActorAnimations animations) { this.actor = actor; this.actorTf = actor.transform; this.actorRb = actorRb; this.groundCheck = groundCheck; this.animations = animations; timeBtwRunSound = startTimeBtwRunSound; }
protected void Start() { actor = gameObject; actorTf = actor.transform; actorRb = actor.GetComponent<Rigidbody2D>(); effects = GetComponent<ActorEffects>(); hand = getChildGameObject(gameObject, "Hand"); groundCheck = new GroundCheck((getChildGameObject(gameObject, "GroundCheck")).transform, LayerMask.GetMask("Ground"), effects, shakeCamera); animations = new ActorAnimations(GetComponent<Animator>()); move = new Move(actor, actorRb, groundCheck, animations); weapon = new Weapon(actor, LayerMask.GetMask("Sword"), hand, startWithWeapon); jump = new Jump(actor, actorRb, groundCheck, animations, effects, hand, weapon); }
public Jump(GameObject actor, Rigidbody2D actorRb, GroundCheck groundCheck, ActorAnimations animations, ActorEffects effects, GameObject hand, Weapon weapon) { this.actor = actor; this.actorTf = actor.transform; this.actorRb = actorRb; this.groundCheck = groundCheck; this.animations = animations; this.effects = effects; this.hand = hand; this.weapon = weapon; timeBtwJump = startTimeBtwJump; timeBtwWallJump = startTimeBtwWallJump; timeBtwJumpTrail = startTimeBtwJumpTrail; }