Ejemplo n.º 1
0
    public override void processPrimaryHit(Item item, GameObject hit, Vector3 hitPoint, Vector3 direction)
    {
        AICharacter c = hit.transform.root.GetComponent <AICharacter>();

        if (c != null)
        {
            attached = c.childBody.gameObject.AddComponent <LiftEffect>();
        }
        else
        {
            attached = hit.AddComponent <LiftEffect>();
        }

        attached.startEffect(item);
    }
Ejemplo n.º 2
0
 public override void secondaryFire(Item item)
 {
     if (attached == null)
     {
         if (comboPoints < maxComboPoints)
         {
             return;
         }
         comboPoints = 0;
         base.secondaryFire(item);
     }
     else
     {
         attached.endEffect();
         attached = null;
         fireable = false;
     }
 }
Ejemplo n.º 3
0
 public override void primaryFire(Item item)
 {
     if (attached != null)
     {
         if (!fireable)
         {
             attached.distance = 4;
             fireable          = true;
         }
         else
         {
             attached.shootForward(shootForwardForce);
             attached = null;
             fireable = false;
         }
     }
     else
     {
         base.primaryFire(item);
     }
 }