コード例 #1
0
    // Use this for initialization
    void Start()
    {
        /*
         * globalxMax = 76f;
         * globalxMin = 0f;
         * globalyMax = 9.8f;
         * globalyMin = -9.9f;*/
        //Screen.SetResolution(960, 640, true);

        mCamera = GetComponent <Camera>();
        target  = GameObject.Find("Meemo").transform;
        cam     = GameObject.Find("Main Camera").transform;

        // World bound support
        mWorldBound = new Bounds(Vector3.zero, Vector3.one);
        UpdateWorldWindowBound();

        cameraMinx = 0f;
        cameraMaxx = globalxMax - mCamera.orthographicSize * mCamera.aspect;
        cameraMiny = globalyMin + mCamera.orthographicSize;
        cameraMaxy = globalyMax - mCamera.orthographicSize;

        this.star_bar   = GameObject.Find("StarBar").GetComponent <StarBar_interaction> ();
        this.health_bar = GameObject.Find("HealthBar").GetComponent <HealthBar_interaction> ();
    }
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        mCamera = GetComponent <Camera>();

        // World bound support
        mWorldBound = new Bounds(Vector3.zero, Vector3.one);
        UpdateWorldWindowBound();
        this.star_bar = GameObject.Find("StarBar").GetComponent <StarBar_interaction> ();
    }
コード例 #3
0
 // Use this for initialization
 void Start()
 {
     this.globalBehavior = GameObject.Find("Main Camera").GetComponent <CameraBehavior>();
     mSize                  = GetComponent <Renderer> ().bounds.size;
     this.health_bar        = GameObject.Find("HealthBar").GetComponent <HealthBar_interaction> ();
     this.rigid_body        = this.GetComponent <Rigidbody2D>();
     isInBubble             = false;
     isFacingRight          = true;
     this.star_bar          = GameObject.Find("StarBar").GetComponent <StarBar_interaction> ();
     gameOverCanvas         = GameObject.Find("GameOverCanvas").GetComponent <Canvas> ();
     this.PowerAnimation    = GameObject.Find("PowerParticle").GetComponent <ParticleSystem> ();
     gameOverCanvas.enabled = false;                 // The GameOverCanvas has to be initially enabled on the Unity UI
     current_state          = MeemoState.Normal;
 }