Ejemplo n.º 1
0
    public static void OpenFor(GameObject go)
    {
        FarmBuilding farm = go.GetComponent <FarmBuilding>();

        if (farm != null)
        {
            FarmProperty.Activate(farm);
        }
    }
Ejemplo n.º 2
0
    void Update()
    {
        if (WorkerAnts == 0)
        {
            return;
        }

        Percentage += WorkerAnts * Time.deltaTime * FarmingSpeed;

        if (Percentage >= 1)
        {
            Percentage--;
            Food++;

            AntDispatcher.RequestCarrier(gameObject);
        }

        FarmProperty.UpdateStats(this);
    }
Ejemplo n.º 3
0
 protected void OnMouseUp()
 {
     FarmProperty.Activate(this);
 }