コード例 #1
0
    bool didRoll; // did the autobots roll out? ( this bool is to keep the audio from playing more than once)

    // Start is called before the first frame update
    void Start()
    {
        rb   = GetComponent <Rigidbody2D>();
        cc   = GetComponent <CircleCollider2D>();
        anim = GetComponent <Animator>();

        hc = FindObjectOfType <handController>();
    }
コード例 #2
0
    void Start()
    {
        sm = this;

        LMHeadMountedRig = GameObject.Find("LMHeadMountedRig");
        playerScale      = 1f;
        isAnalogClock    = true;
        tutorialMode     = false;
        controller       = hand.GetComponent <handController>();
    }
コード例 #3
0
ファイル: OpenDoor.cs プロジェクト: jonas-hrw/GTFO2
	void Start ()
	{

		//animator = GetComponent<Animator>();
        
		doorOpen = false;
		startRot = transform.eulerAngles;
		endRot = new Vector3 (startRot.x, startRot.y + angleDoor, startRot.z);
		//TODO: Move calls to inventory to gameController for overview reasons.
		inventory = GameObject.FindGameObjectWithTag ("GameController").GetComponent <Inventory> ();
		animator = gameObject.GetComponent<Animator> ();
		canvas = GameObject.Find ("Canvas").GetComponent<Canvas> ();
		audio = gameObject.GetComponent<AudioSource> ();
		doorText = Resources.Load ("Prefabs/doorText") as GameObject;
		textDoor = Instantiate (doorText, new Vector2(Screen.width/2,20), Quaternion.identity) as GameObject;
		textDoor.transform.parent = canvas.transform;
		textDoor.SetActive (false);
        
        handController = GameObject.FindObjectOfType<handController>();

	}
コード例 #4
0
ファイル: appleManager.cs プロジェクト: gensuta/Final-Project
 // Start is called before the first frame update
 void Start()
 {
     hc = FindObjectOfType <handController>();
     pineConeWaitTime = Random.Range(0.2f, 2.5f);
     originalRestNum  = resetNum;
 }
コード例 #5
0
 // Start is called before the first frame update
 void Start()
 {
     hc = FindObjectOfType <handController>();
 }