コード例 #1
0
    public void FinishBreed()
    {
        GameObject SlimeToSpawn = CM.GetBreedingResult(this.type, creatureToBreedWith.GetComponent <CreatureScript>().type);

        Instantiate(SlimeToSpawn, this.transform.position, Quaternion.identity, this.transform.parent);

        breeding = false;
        creatureToBreedWith.GetComponent <CreatureScript>().breeding = false;
        TouchManager.Instance.targetSlime = null;
        CreatureManager.Instance.creaturesInWorld.Remove(creatureToBreedWith);
        Destroy(creatureToBreedWith.gameObject);
        CreatureManager.Instance.creaturesInWorld.Remove(this.gameObject);
        Destroy(this.gameObject);
        CreatureManager.Instance.SaveCreatures();
    }