Ejemplo n.º 1
0
        protected virtual void Awake()
        {
            motor_ = GetComponent<PlayerMotor>();
            _owner = GetComponent<Player>();

            _eye = GetComponentInChildren<SearchEye>();
            _eye.OnFind = FindPlayer;
            _eye.OnLoseSight = LostPlayer;
        }
Ejemplo n.º 2
0
 protected override void OnInitialize()
 {
     _player = GetComponent<Player>();
     _motor = GetComponent<PlayerMotor>();
 }
Ejemplo n.º 3
0
 private void SetPlayer(Player player)
 {
     if (Player != null)
         Destroy(Player);
     Player = player;
 }