// Use this for initialization
 void Start()
 {
     _basicAttack = gameObject.GetComponent<BasicStunAttack> ();
     _maxTimesUse = 8;
     _coolDownTime = 0.5f;
     _rangeAttack = 4.2f;
 }
Esempio n. 2
0
    void Awake()
    {
        this.transform.tag = Tags.PLAYER;

        _myPlatformerMovement = gameObject.AddComponent<PlatformerMovement>();

        _attackCatcher = gameObject.AddComponent<AttackCather> ();
        _clashAble = gameObject.AddComponent<ClashAble> ();
        _basicAttack = gameObject.AddComponent<BasicStunAttack> ();
        _playerTransformer = gameObject.AddComponent<PlayerTransformer> ();
        gameObject.AddComponent<TouchDetector2D> ();
        gameObject.AddComponent<LandOnTopKill> ();
        rigidBody = gameObject.GetComponent<Rigidbody2D> ();
        _playerAnimHandler = gameObject.AddComponent<PlayerAnimationHandler> ();
        gameObject.AddComponent<RigidbodyUtil2D>();

        _fader = gameObject.AddComponent<FadeInOut> ();

        gameObject.AddComponent<PlayerEffects>();
        gameObject.AddComponent<PlayerSoundHandler>();

        _stunTimer = gameObject.AddComponent<ComTimer> ();

        _stunTimer.TimerEnded += StunTimerEnded;

        _attackCatcher.OnStunAttackCatch += OnStunHit;
        _attackCatcher.OnStunKillAttackCatch += OnStunKillHit; // if Jump on my head hit while in stun
        _attackCatcher.OnKillAttackCatch += OnKillHit;
    }