Пример #1
0
 void Start()
 {
     foreach (Mole m in moles)
     {
         MoleSprite spr = Instantiate(moleSpritePrefab);
         m.SetSprite(spr);
         spr.transform.localPosition = new Vector3(0f, 0.001f, 0f);
         spr.transform.localScale    = new Vector3(0.35f, 0.35f, 0.35f);
         m.Reset();
     }
 }
Пример #2
0
 public void SetSprite(MoleSprite sprite)
 {
     moleSprite = sprite;
     sprite.transform.SetParent(transform);
 }