コード例 #1
0
 // Use this for initialization
 void Start()
 {
     laser2           = GameObject.Find("Laser2");
     ps               = laser2.GetComponent <ParticleSystem>();
     originalPosition = this.transform.position;
     fan              = FindObjectOfType <Fan>();
     fanMarker        = FindObjectOfType <FanPositionMarker>();
 }
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        levelManager        = FindObjectOfType <LevelManager>();
        fan                 = FindObjectOfType <Fan>();
        fanSocket           = GameObject.Find("FanSocket");
        rb                  = GetComponent <Rigidbody>();
        powerInstructions   = GameObject.Find("PowerInstructions").GetComponent <Text>();
        movableInstructions = GameObject.Find("MovableInstructions").GetComponent <Text>();
        fanMarker           = FindObjectOfType <FanPositionMarker>();

        rb.constraints = RigidbodyConstraints.FreezePositionZ;
        startPostion   = this.transform.position;
        Invoke("ActivatePowerInstructions", 4);
    }