Пример #1
0
    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;
    }
Пример #2
0
    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);
    }
Пример #3
0
    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;
    }