Пример #1
0
 public void Start()
 {
     _model = GetComponent <PawnModelComponent>().PawnModel;
     _model.OnUnitKilled += () =>
     {
         GameObject.Destroy(transform.gameObject);
     };
     MyStart();
 }
Пример #2
0
 private void UpdateView()
 {
     if (_model == null) // todo more elegant solution
     {
         _model = GetComponent <PawnModelComponent>().PawnModel;
     }
     transform.localPosition    = _model.Position.GetPosition();
     transform.localEulerAngles = new Vector3(90, _model.Orientation.FlatRotation(), 0);
 }