Пример #1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Пример #2
0
 // Update is called once per frame
 void Update()
 {
     if (trashApplied)
     {
         TrashMountain.DestroyTrash(gameObject);
         Destroy(gameObject);
     }
 }
Пример #3
0
 // Use this for initialization
 void Start()
 {
     spawnTime     = Time.timeSinceLevelLoad;
     trashMountain = TrashMountain.GetInstance();
     facing        = transform.rotation;
 }