// Start is called before the first frame update void Start() { _MyProperty = this.gameObject.GetComponent <Ctrl_BaseEnemyProperty>(); _Animator = this.gameObject.GetComponent <Animator>(); GameObject goPlayer = GameObject.FindGameObjectWithTag(Tag.Player); if (goPlayer) { _PlayerProperty = goPlayer.GetComponent <Ctrl_PlayerProperty>(); } }
private void Awake() { Instance = this; }