Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        // 選択中のキャラクター番号
        int nSelCharactor = SettingManager.LoadSelectCharactor();

        //nSelCharactor = 29;

        walkSpeed = walkSpeedArray[nSelCharactor];

        mChangeChar = GetComponent <ChangeCharactor> ();
        mChangeChar.Change(nSelCharactor);

        mCharactor          = mChangeChar.GetCharactor(nSelCharactor);
        characterController = mCharactor.GetComponent <CharacterController> ();
        animator            = mCharactor.GetComponent <Animator> ();
//		joystick = GameObject.Find("Joystick").GetComponent <Joystick> ();
//		RightJoystick = GameObject.Find("RightJoystick").GetComponent <Joystick> ();

        int value = Random.Range(0, 5);

        Vector3 pos = mCharactor.transform.position;

        pos.x = startPos[value, 0];
        pos.y = startPos[value, 1];
        pos.z = startPos[value, 2];
        mCharactor.transform.position = pos;

        //StartCoroutine("CheckForDeletedParticles");
    }
Beispiel #2
0
 void ChangeCharactor()
 {
     if (ChangeChar)
     {
         // 選択中のキャラクター番号
         int nSelCharactor = SettingManager.LoadSelectCharactor();
         Debug.Log(nSelCharactor);
         ChangeChar.Change(nSelCharactor);
     }
 }