コード例 #1
0
ファイル: PropertyManager.cs プロジェクト: sellep/antsworld
    public static void OpenFor(GameObject go)
    {
        FarmBuilding farm = go.GetComponent <FarmBuilding>();

        if (farm != null)
        {
            FarmProperty.Activate(farm);
        }
    }
コード例 #2
0
ファイル: FarmBuilding.cs プロジェクト: sellep/antsworld
    void Update()
    {
        if (WorkerAnts == 0)
        {
            return;
        }

        Percentage += WorkerAnts * Time.deltaTime * FarmingSpeed;

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

            AntDispatcher.RequestCarrier(gameObject);
        }

        FarmProperty.UpdateStats(this);
    }
コード例 #3
0
ファイル: FarmBuilding.cs プロジェクト: sellep/antsworld
 protected void OnMouseUp()
 {
     FarmProperty.Activate(this);
 }