/// <summary> /// The Manager Of The Arms if its WithGun Or not /// </summary> /// <param name="Objective">The Objective will be Pointing</param> public void ArmsManager(Vector3 Objective) { if (!WithGun) { FightingObject.Move(); FightingObject.AnimationManager(); FightingObject.Attacks(); } else { ShootingObject.GetDirectionAndAngle(Objective); ShootingObject.WithgunMove(); ShootingObject.RotateArm(); ShootingObject.Aiming(); ShootingObject.Shooting(); ShootingObject.Reload(); } ShootingObject.IlluminateShoot(); if (GameplayActions.QuitShootAction) { WithGun = !WithGun; } ShootingObject.ArmsAnim.SetBool("CanShowup", CanShowup()); }
private void HandleTowerBought(ShootingObject obj) { if (Money >= ShootingObject.Value) { Money -= ShootingObject.Value; } }
bool CanShowup() { if (WithGun && ShootingObject.mult != 1) { if (!ShootingObject.CanTurn()) { if (StateInfo.Shooting.ShootingMovement || StateInfo.Shooting.OnCover) { return(true); } } } return(false); }
public MovingObject getTankInRange(ShootingObject tower, float range) { List <MovingObject> nearTanks = new List <MovingObject>(); foreach (var tank in tanks) { if (tower.Position.IsNear(tank.Position, range)) { nearTanks.Add(tank); } } if (nearTanks.Count > 0) { return(nearTanks[0]); } return(null); }
void Awake() { shootingObject = this.GetComponent<ShootingObject>(); }
private void HandleTowerCreated(ShootingObject obj) { AddChild(obj); towers.Add(obj); }
private void HandleLabelChanged(ShootingObject obj) { label.Text = $"Life: {gamer.Lifes} Money: {gamer.Money}"; }