// Use this for initialization public virtual void Start() { alienTargetManager = SceneUtils.FindObject <AlienTargetManager>(); alienInputActions = AlienInputActions.CreateWithDefaultBindings(); leftStickControl = SceneUtils.FindObject <LeftStickControl>(); animationManager = GetComponentInChildren <AnimationManager2D>(); if (this.transform.Find("Sounds")) { if (this.transform.Find("Sounds/ExplosionSound")) { explosionSound = this.transform.Find("Sounds/ExplosionSound").GetComponent <SoundObject>(); } if (this.transform.Find("Sounds/FlingSound")) { flingSound = this.transform.Find("Sounds/FlingSound").GetComponent <SoundObject>(); } } if (this.transform.Find("ShootPosition")) { shootPosition = this.transform.Find("ShootPosition"); } else { shootPosition = this.transform; } if (isControlled) { OnControlled(); } if (this.transform.Find("BloodAnimations")) { bloodAnimations = this.transform.Find("BloodAnimations") .GetComponentsInChildren <Animation2D>(); } }
// Use this for initialization void Awake() { aimIndicator = this.transform.Find("AimIndicator"); alienTargetManager = SceneUtils.FindObject <AlienTargetManager>(); }