// Use this for initialization void Awake() { _vehicle = GetComponent <AutonomousVehicle>(); if (_vehicle == null) { Destroy(this); throw new System.Exception("Missing vehicle, cannot continue"); } }
// Use this for initialization void Awake() { _vehicle = GetComponent<AutonomousVehicle>(); if (_vehicle == null) { Destroy(this); throw new System.Exception("Missing vehicle, cannot continue"); } }
//public Transform head; void Awake() { steerfortarget = gameObject.GetComponent <SteerForTarget>(); vehicle = this.gameObject.GetComponent <AutonomousVehicle>(); person = this.gameObject.GetComponent <Person>(); aware = this.gameObject.GetComponent <Aware>(); personControl = GameObject.Find("Game Controller").GetComponent <s_PersonControl>(); me = this.gameObject; sightdetect = this.gameObject.GetComponentInChildren <SightDetect>(); clicker = GameObject.Find("Game Controller").GetComponent <s_Clicker>(); }
protected override void Initialize() { randomSteer = GetComponent<RandomnessSteerForPoint>(); steerForPoint = GetComponent<SteerForPoint>(); vehicle = GetComponent<AutonomousVehicle>(); animator = GetComponentInChildren<Animator>(); if(manager != null) { manager.pocketTracker.OnPocket += OnPocket; } }
override protected void Initialize() { randomSteer = GetComponent <RandomnessSteerForPoint>(); steerForPoint = GetComponent <SteerForPoint>(); vehicle = GetComponent <AutonomousVehicle>(); animator = GetComponentInChildren <Animator>(); if (manager != null) { manager.pocketTracker.OnPocket += OnPocket; } }
void Start() { vehicle = GetComponent<AutonomousVehicle>(); photonView = GetComponent<PhotonView>(); //Sets itself up for networking if (!photonView.isMine) { //DisableAI(); } health = _health; InitEnemy(); }
//public Transform head; void Awake() { steerfortarget = gameObject.GetComponent<SteerForTarget>(); vehicle = this.gameObject.GetComponent<AutonomousVehicle>(); person = this.gameObject.GetComponent<Person>(); aware = this.gameObject.GetComponent<Aware>(); personControl = GameObject.Find("Game Controller").GetComponent<s_PersonControl>(); me = this.gameObject; sightdetect = this.gameObject.GetComponentInChildren<SightDetect>(); clicker = GameObject.Find("Game Controller").GetComponent<s_Clicker>(); }
public void ChangeSize(float percent) { Vehicle = GetComponent<AutonomousVehicle>(); Vehicle.MaxSpeed *= 1 + percent; // bigger size, faster max speed Vehicle.TurnTime *= 1 - (2 * percent); // bigger size, slower turn time Vehicle.Transform.localScale *= 1 - (2 * percent); // change local scale Vehicle.ScaleRadiusWithTransform(_originalRadius); // scale original radius OriginalSpeed = Vehicle.MaxSpeed; OriginalTurnTime = Vehicle.TurnTime; }