Ejemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     soundManager = GetComponent <SoundManager> ();
     inputManger  = GetComponent <InputManager> ();
     shinCamera   = GameObject.Find("Main Camera").AddComponent <FieldCameraFixation> ();
     status       = GetComponent <StatusData> ();
     nowStage     = 0;
     soundManager.PlayBGM(GetComponent <SceneManager> ().nowStage == 0 ? 1 : 2);
     CreateStage(nowStage, Vector3.zero);
     //InitStage (0);
     this.enabled = false;
 }
Ejemplo n.º 2
0
    public void Prepare(int id, StatusBase s, FieldCameraFixation sc, GameObject manager)
    {
        //	ID = id;

        status = s;

        scamera = sc;

        inputManager = manager.GetComponent <InputManager> ();

        soundManager = manager.GetComponent <SoundManager> ();

        _animation = GetComponent <Animation> ();

        headOffset = (GetComponent <CharacterController> ().bounds.max.y - transform.position.y) / 3 * 2;

        scamera.targetPosition = new Vector3(transform.position.x, transform.position.y + headOffset, transform.position.z);

        face = GetComponentInChildren <Renderer> ().materials[0];
    }