コード例 #1
0
        void FightFire()
        {
            FaceToward(_goal);
            // Debug.Log("Fighting fire");
            StopAllCoroutines();
            var cloud = Instantiate(cloudPrefab, _goal);

            cloud.transform.SetParent(StoryController.Instance().transform);
            _goal.GetComponent <FlameController>().Extinguish();
            _goal = null;
            FindObjectOfType <AudioManager>().Play("steam_hiss");
        }
コード例 #2
0
 public void Extinguish()
 {
     StartCoroutine(Shrink(transform.GetComponentInChildren <SpriteRenderer>()));
     // GetComponentInChildren<SpriteRenderer>().color = new Color(0, 0, 0, 0);
     StoryController.Instance().FireWasExtinguished(this);
 }