示例#1
0
 // Use this for initialization
 void Start()
 {
     waterLevel    = gameObject.GetComponentInParent <waterLevel>();
     meshRender    = Resources.Load("showWaterVolume/Materials/0水量") as Material;
     rend          = GetComponentInChildren <Renderer>();
     rend.material = meshRender;
 }
示例#2
0
 // Use this for initialization
 void Start()
 {
     growingSTATUS         = GrowingSTATUS.empty;
     waterLevel            = gameObject.GetComponent <waterLevel>();
     waterLevel.isPlanting = true;   //鎖定種植後加水才會增加水量
     hp = eggplant.hp;               //獲得VegetableDetail_Static裡面pumpkin的生命值
     countMatureTime();
 }
示例#3
0
    /*public float field01;
     * public float field01Alpha = 255.0f;
     *
     * public float field02;
     * public float field02Alpha = 0.0f;*/

    // Use this for initialization
    void Start()
    {
        waterLevel    = gameObject.GetComponentInParent <waterLevel>();
        meshRender    = Resources.Load("fields/土_2") as Material;
        rend          = GetComponentInChildren <Renderer>();
        rend.material = meshRender;
        //field01 = gameObject.GetComponentInChildren<Renderer> ().materials[0].color.a;
        //field02 = gameObject.GetComponentInChildren<Renderer> ().materials[1].color.a;
    }
示例#4
0
    // Use this for initialization
    void Start()
    {
        task       = GameObject.FindGameObjectWithTag("task").GetComponent <TasksPerformed>();
        waterLevel = gameObject.GetComponentInParent <waterLevel>();

        //獲得土壤中的create植物.cs
        createPumpkin  = gameObject.GetComponentInParent <createPumpkin>();
        createCarrot   = gameObject.GetComponentInParent <createCarrot>();
        createTomato   = gameObject.GetComponentInParent <createTomato>();
        createCucumber = gameObject.GetComponentInParent <createCucumber>();
        createEggplant = gameObject.GetComponentInParent <createEggplant>();

        /*if(createVeg_cs!=null){
         *      ontri = true;
         * }*/
    }
示例#5
0
 // Use this for initialization
 void Start()
 {
     waterLevel = gameObject.GetComponent <waterLevel>();
 }