// Use this for initialization void Start() { // get requried compoents mover = GetComponent <TankMover> (); pawn = GetComponent <TankData> (); shoot = GetComponent <TankShooter> (); }
private Color hearingColor = Color.red; //Color for hearing sphere gizmo, init. red. // Start is called before the first frame update void Start() { //Get and set data and motor on Start data = GetComponent <TankData>(); motor = GetComponent <TankMotor>(); tf = GetComponent <Transform>(); shooter = GetComponent <TankShooter>(); //get reference to manager player (temporary until next milestone) player = GameManager.instance.instantiatedPlayerTank; //Add self to GameManager list of enemies GameManager.instance.instantiatedEnemyTanks.Add(this.gameObject); //Get and Set Territory from randomly generated room, if not pre-set if (!territory) { //Set Territory to a random territory from the level game object - map generator list of territories territory = GameManager.instance.LevelGameObject.GetComponent <MapGenerator>().instantiatedTerritories[UnityEngine.Random.Range(0, GameManager.instance.LevelGameObject.GetComponent <MapGenerator>().instantiatedTerritories.Count)]; } //Get and Set Waypoints array from territory, if waypoints array is null if (waypoints == null || waypoints.Length == 0) { waypoints = territory.waypoints; } //Teleport Swiss on start to middle of assigned territory (to avoid getting lost and stuck in generated map if (personality == Personalities.Swiss) { transform.position = territory.gameObject.transform.position; } }
// Start is called before the first frame update void Start() { shooter = GetComponent <TankShooter>(); motor = GetComponent <TankMotor>(); data = GetComponent <TankData>(); health = GetComponent <Health>(); }
private void Awake() { tf = GetComponent <Transform>(); motor = GetComponent <TankMotor>(); attack = GetComponent <TankShooter>(); health = GetComponent <Health>(); }
// Use this for initialization void Start() { mover = GetComponent <TankMover>(); shooter = GetComponent <TankShooter>(); health = GetComponent <TankHealth>(); Bullet = GetComponent <Bullet>(); }
// Start is called before the first frame update void Start() { // get components for each variable for inspector mover = GetComponent <TankMover>(); shooter = GetComponent <TankShooter>(); health = GetComponent <TankHealth>(); }
// Start is called before the first frame update void Start() { //tells when the game starts what these objects mean data = gameObject.GetComponent <TankData>(); motor = gameObject.GetComponent <TankMotor>(); shooter = gameObject.GetComponent <TankShooter>(); }
// Start is called before the first frame update void Start() { data = gameObject.GetComponent <TankData>(); motor = gameObject.GetComponent <TankMotor>(); tf = gameObject.GetComponent <Transform>(); shooter = gameObject.GetComponent <TankShooter>(); }
// Start is called before the first frame update void Start() { motor = GetComponent <TankMotor>(); data = GetComponent <TankData>(); shooter = GetComponent <TankShooter>(); CanSee = GetComponent <AISenses>(); CanHear = GetComponent <AISenses>(); }
// Start is called before the first frame update void Start() { data = gameObject.GetComponent <TankData>(); motor = gameObject.GetComponent <TankMotor>(); tf = gameObject.GetComponent <Transform>(); shooter = gameObject.GetComponent <TankShooter>(); target = GameManager.instance.instantiatedPlayerTank.transform; }
// Start is called before the first frame update void Start() { data = GetComponent <TankData>(); motor = GetComponent <TankMotor>(); shooter = GetComponent <TankShooter>(); }
//TODO Set up a method. bool isNotAtFinalWaypoint = currentWaypoint < (waypoints.Length - 1); // Start is called before the first frame update void Start() { data = GetComponent <TankData>(); motor = GetComponent <TankMotor>(); shooter = GetComponent <TankShooter>(); lastEventTime = Time.time - timerDelay; waypoints = GameObject.FindGameObjectsWithTag("patrolPoint"); }
// Initialize the variables and game state private void Awake() { // Recall and intialize Transform component tf = GetComponent <Transform>(); // Recall and intialize TankMotor component mover = GetComponent <TankMotor>(); // Recall and intialize TankShooter component shoot = GetComponent <TankShooter>(); // Recall and intialize TankHealth component health = GetComponent <TankHealth>(); }
/* Private Variables */ private void Awake() { // Component reference assignments tankTf = this.gameObject.GetComponent <Transform>(); tankMover = this.gameObject.GetComponent <TankMover>(); tankShooter = this.gameObject.GetComponent <TankShooter>(); tankCc = this.gameObject.GetComponent <CharacterController>(); tankHealthMan = this.gameObject.GetComponent <TankHealthManager>(); tankScorer = this.gameObject.GetComponent <TankScorer>(); tankNoisemaker = this.gameObject.GetComponent <TankNoisemaker>(); }
/// <summary> /// Sets up this InputController's references to the new tank /// </summary> /// <param name="newTankData">The TankData component of the new tank being controlled by this InputController.</param> public void SetTankComponentReferences(TankData newTankData) { tankData = newTankData; tankShooter = newTankData.tankShooter; tankMover = newTankData.tankMover; if (playerNumber == PlayerNumber.Player1) { tankData.tankCamera.cullingMask = GameManager.gm.p1UILayer; } else if (playerNumber == PlayerNumber.Player2) { tankData.tankCamera.cullingMask = GameManager.gm.p2UILayer; } }
// Start is called before the first frame update void Start() { data = GetComponent <TankData>(); motor = GetComponent <TankMotor>(); shooter = GetComponent <TankShooter>(); if (this.gameObject == GameManager.Instance.Players[0]) { inputScheme = InputScheme.WASD; } else { inputScheme = InputScheme.arrowKeys; } }
// Start is called before the first frame update void Start() { senses = gameObject.GetComponent <Senses>(); data = GetComponent <TankData>(); motor = GetComponent <TankMotor>(); shooter = GetComponent <TankShooter>(); health = GetComponent <Health>(); controller = GetComponent <AIController>(); lastEventTime = Time.time; playerOne = GameManager.Instance.Players[0]; playerTwo = GameManager.Instance.Players[1]; shooter.cannonBallPrefab = GameManager.Instance.projectilePrefab; }
public InputScheme inputScheme = InputScheme.arrowKeys; // Default control scheme is set to arrow keys, but can be changed // Start is called before the first frame update void Start() { data = GetComponent <TankData>(); motor = GetComponent <TankMotor>(); shooter = GetComponent <TankShooter>(); lastEventTime = Time.time - timerDelay; if (this.gameObject == GameManager.Instance.Players[0]) { inputScheme = InputScheme.arrowKeys; } if (this.gameObject == GameManager.Instance.Players[1]) { inputScheme = InputScheme.WASD; } }
[HideInInspector] public TankShooter shooter; // For TankShooter void Start() { // Fill the variables with the proper componets mover = GetComponent <TankMover> (); shooter = GetComponent <TankShooter> (); }
private TankShooter ts; //tank shooter data // Use this for initialization void Start() { ts = GetComponent <TankShooter> (); //sets ts to tank shooter data Destroy(gameObject, bulletLife); //destroys bullet after set amount of time }
protected override void Awake() { base.Awake(); _tankShooter = GetComponent <TankShooter>(); _nodeManager = GameObject.FindObjectOfType <NodeManager>(); }
// Use this for initialization void Start() { data = GetComponent <TankData> (); //sets data to tank data ts = GetComponent <TankShooter> (); //sets ts to tank shooter }
void Awake() { tankshooter = TankGameObject.GetComponent <TankShooter> (); guiDisplay = GuiGameObject.GetComponent <GuiDisplay> (); agent = AgentGameObject.GetComponent <UnityEngine.AI.NavMeshAgent> (); }
void Start() { mover = GetComponent <TankMover> (); shooter = GetComponent <TankShooter> (); }