Esempio n. 1
0
 void Start()
 {
     // Simple Billborad
     rb         = GetComponent <Rigidbody2D>();
     pawn       = GetComponent <PawnState>();
     renderBody = transform.Find("Body")?.GetComponent <SpriteRenderer>();
     renderHead = transform.Find("Head")?.GetComponent <SpriteRenderer>();
     transArrow = transform.Find("Arrow");
 }
Esempio n. 2
0
 public void DestoryPawn(PawnState pawn)
 {
     if (pawn is EnemyState)
     {
         var item = enemyList.Find(it => it == pawn);
         enemyList.Remove(item);
     }
     else
     if (pawn is HeroState)
     {
         hero = null;
     }
     GameObject.Destroy(pawn.gameObject);
 }
Esempio n. 3
0
 public void GameFailCallBack(PawnState _)
 {
     Time.timeScale = 0f;
     failMenu.gameObject.SetActive(true);
 }