public override void GenerateMonster() //实现钩子操作 { if (Dinosaur.dinosaurCount <= 3) { Debug.Log("DinosaurController: generate"); Dinosaur dinosaurShell = dinosaur.GetComponent <Dinosaur>(); dinosaurShell.GenerateSlef(); Dinosaur.dinosaurCount++; //恐龙的数量 +1 } }