// Use this for initialization void Awake() { // Initialize our references UnderPlatform = transform.Find("CreateObjects"); ARCameraTransform = GameObject.Find("ARCamera").transform; scaleUnitWrapper = GetComponent<ScaleUnitWrapper>(); Assert.IsTrue(scaleUnitWrapper && UnderPlatform && ARCameraTransform); //TankStartLocation = GameObject.Find("spawnTankZone").transform; }
// Use this for initialization protected void Awake () { myCollider = GetComponent<Collider>(); ai = GetComponent<SeekingWanderAI>(); scaleUnitWrapper = GetComponent<ScaleUnitWrapper>(); Assert.IsTrue(myCollider && myCrosshair && scaleUnitWrapper); myCrosshair.transform.localPosition = new Vector3(0, myCrosshair.transform.localPosition.y, 0); hitPoints = maxHitPoints; shipState = SpaceShipState.Inactive; dead = GameObject.Find("enemy_explosion").GetComponent<AudioSource>(); ai.BaseSpeed = maxBaseSpeed; ai.TurnSpeed = maxTurnSpeed; }