Esempio n. 1
0
 private void Start()
 {
     FieldType = FieldAttribute.Type.Wasteland;
     PlantType = PlantTypeAttribute.PlantType.None;
     //  最初は非表示に
     timeSlider.gameObject.SetActive(false);
     image.enabled = false;
 }
Esempio n. 2
0
    private IEnumerator SeedTimer()
    {
        image.sprite = Resources.Load <Sprite>("Images/Plants/SeedImg");
        PlantType    = PlantTypeAttribute.PlantType.Seed;
        // ログ出力
        Debug.Log("植えられました");

        // 10秒待つ
        yield return(new WaitForSeconds(10.0f));

        image.sprite = Resources.Load <Sprite>("Images/Plants/komugiImg");
        PlantType    = PlantTypeAttribute.PlantType.Wheat;

        Debug.Log("育ちました");
    }
Esempio n. 3
0
    public int Harvest()
    {
        if (PlantType == PlantTypeAttribute.PlantType.None ||
            PlantType == PlantTypeAttribute.PlantType.Seed)
        {
            return(0);
        }

        PlantType = PlantTypeAttribute.PlantType.None;
        FieldType = FieldAttribute.Type.Farmland;

        image.enabled = false;
        var count = Random.Range(1, 3);

        return(count);
    }