Exemple #1
0
    public void FireMainGun()
    {
        GameObject  newRocket  = Instantiate(selectedWeapon, transform.position + transform.forward, transform.rotation) as GameObject;
        ILockTarget lockTarget = newRocket.GetComponent <ILockTarget>();

        if (CurrentTarget != null && lockTarget != null)
        {
            lockTarget.SetTarget(CurrentTarget);
        }
    }
 private void AssignLockTarget(ILockTarget newTargt)
 {
     if (CurrentLock != null)
     {
         CurrentLock.DisableLockedOnGui();
     }
     CurrentLock = newTargt;
     if (newTargt != null)
     {
         CurrentLock.EnableLockedOnGui();
     }
 }