예제 #1
0
    public void AddIconToSlot(GeneticIcon icon, BreedingSlot slot)
    {
        // remove existing one first
        if (slot.iconInSlot != null)
        {
            slot.iconInSlot.ResetPosition();
        }

        slot.SetIconInSlot(icon);
    }
예제 #2
0
파일: GeneticIcon.cs 프로젝트: pernjie/hero
 public void DropOnSlot(BreedingSlot breedingSlot)
 {
     if (sample.unit.gender == breedingSlot.genderSlot)
     {
         inSlot = true;
         this.transform.position = breedingSlot.gameObject.transform.position;
         breedingPopup.AddIconToSlot(this, breedingSlot);
     }
     else
     {
         ResetPosition();
     }
 }