Пример #1
0
 // Start is called before the first frame update
 void Start()
 {
     hitPoints = durability;
     type      = defaultType;
     SetModel(type);
     owner = PotOwner.none;
 }
Пример #2
0
    //private void Update()
    //{
    //    if (Input.GetKeyDown(destroyTestKey))
    //    {
    //        Hit();
    //    }
    //    else if (Input.GetKeyDown(craftTestKey))
    //    {
    //        Craft(craftDefaultType, 1);
    //    }
    //}

    public PotSpotController Craft(PotType type, int playerOwner)
    {
        // if (this.type == PotType.None)
        // {
        aSrcPotCraft.Play();
        SpawnParticles();
        SetModel(type);
        // }
        owner = (PotOwner)playerOwner;
        return(this);
    }