Пример #1
0
        public void Fire()
        {
            if (!active)
            {
                return;
            }
            if (count0 > 0)
            {
                return;
            }

            if (MV != null)
            {
                MV.PlayAnimation(cattack + 2);
                EnableAttack();
            }
            else if (EX != null)
            {
                count1 = (EX.cooldown + 0.02f) * EX.maxext; count0 = count1 * 2; EnableAttack();
            }

            if (cattack == 2)
            {
                if (G != null)
                {
                    //G.enabled = true;
                    G.Fire(); //Test
                    //G.enabled= false;
                }
            }
            //if (count < 0.08f) { count = 2f; }
            cattack++;
            if (cattack > 2)
            {
                cattack = 0;
            }

            if (CH != null && CH.HeldItem == transform)
            {
                sendtoH = true;
            }
            if (MV != null)
            {
                count0 += MV.currentAniTime() + 0.2f;
            }
            //Debug.Log(cattack +"  "+ count0);
        }
Пример #2
0
 private void DoEquipAni()
 {
     if (MV == null)
     {
         return;
     }
     if (!equipanimate)
     {
         return;
     }
     //Character.Player P = GetComponentInParent<Character.Player>();
     Character.Humus H = GetComponentInParent <Character.Humus>();
     if (H != null && H.HeldItem == transform) //Only player can do animations for now
     {
         MV.PlayAnimation(1);
         counter = MV.currentAniTime();
         canfire = false;
     }
 }