Esempio n. 1
0
    void Start()
    {
        if (lastHit != null)
        {
            GameObject.Destroy(lastHit);
        }
        tex = GetComponent <TextMesh>();

        int _comboNum = HitCombo.GetComboNum();

        tex.text = _comboNum.ToString();
        lastHit  = this.gameObject;
    }
Esempio n. 2
0
 void OnCollisionEnter(Collision other)
 {
     if (other.transform.CompareTag("Enemy") == true && GameManager.GetGameStatus() == GameManager.GameStatus.Playing && speed > HandSpeed && timer <= 0)
     {
         other.transform.GetComponentInParent <EnemyHealth>().TakeDamage(10);
         audio.clip = HitClip;
         audio.Play();
         GameObject _effect = (GameObject)Instantiate(HitEffect, other.contacts[0].point, Quaternion.identity);
         ComboSystem.Combo();
         if (HitCombo.GetComboNum() > 1)
         {
             GameObject _combo = (GameObject)Instantiate(ComboText, other.contacts[0].point, Quaternion.identity);
         }
         timer = AttackCD;
     }
 }
        private void CommonInstall()
        {
            PreInstall();

            SignalBusInstaller.Install(Container);
            Container.DeclareSignal <GameLostSignal>();

            Container.BindInterfacesAndSelfTo <Score>().AsSingle();

            _fakeHitCombo = Substitute.For <HitCombo>();
            Container.Bind <HitCombo>().FromInstance(_fakeHitCombo).AsSingle();
            _fakePlayerPrefs = Substitute.For <IPlayerPrefs>();
            Container.Bind <IPlayerPrefs>().FromInstance(_fakePlayerPrefs).AsSingle();

            PostInstall();
        }
 public void SetUp()
 {
     _hitCombo = new HitCombo();
 }