コード例 #1
0
    // Use this for initialization
    void Start()
    {
        t = Time.deltaTime;
        dt = Time.deltaTime;
        effectBox.SetActive (false);
        parentObject = GameObject.Find ("parentObject");
        fallHeight = 6;
        listFloors = new List<GameObject>();
        listCubes = new List<GameObject>();
        //uiPanel = GameObject.Find ("UIPanel");
        //uiPannelHeight = uiPanel.GetComponent<RectTransform> ().sizeDelta.y;
        stagecontroll = gameObject.GetComponent<Stage01ControlKawashima> ();

        //listSelectableCubes = new List<GameObject> ();
        //listNotRayedFloors = new List<GameObject>();
        ray = new Ray();

        //fCreateField ();

        //		var cube1 = Instantiate (cube, new Vector3(0,6,0), transform.rotation);
        //t = dt , this moment
        //if time.deltaTime = 3, t = dt =3
    }
コード例 #2
0
ファイル: RollArrow.cs プロジェクト: tetsuyamaguchi/BOXStetsu
    // Use this for initialization
    void Start()
    {
        playercontroll = GameObject.Find ("Boxs2nd2").GetComponent<PlayerControll> ();
        createstagecontroll = GameObject.Find ("Main").GetComponent<CreateStageControll> ();

        origin = gameObject.tag;

        StartCoroutine ("fBlockIsOnGroundFlag");

        if (gameObject.tag == "TurnL")
        {
            clone = Instantiate (turnCanvas, transform.position, Quaternion.Euler (90, 0, 0)) as GameObject;

            clone.transform.SetParent(transform);

            StartCoroutine ("fRollLObject");
        }

        if (gameObject.tag == "TurnR")
        {

            clone = Instantiate (turnCanvas, transform.position, Quaternion.Euler (90, 0, 0)) as GameObject;
            clone.transform.localScale = new Vector3(-1 * clone.transform.localScale.x,
                                                     clone.transform.localScale.y,
                                                     clone.transform.localScale.z);

            clone.transform.SetParent(transform);

            StartCoroutine ("fRollRObject");
        }

        //********************************************* 0629 igarashi start
        if (gameObject.tag == "Bomb")
        {
            StartCoroutine ("fBombObject");
        }
        //********************************************* 0629 igarashi end
        //-------------------------------------------------0715 kawashima add
        mainkawashima = GameObject.Find ("Main").GetComponent<MainKawashima> ();
        stagecontroll = GameObject.Find ("Main").GetComponent<Stage01ControlKawashima> ();
    }