コード例 #1
0
    ///////////////////////////////////////////////////////


    void Start()



    {
        //ゲームマネージャー取得
        gamemanager = GameObject.Find("GameManager");
        Game_M      = gamemanager.GetComponent <GameManager_M>();
        speed       = 6.0f;
        jumpSpeed   = Game_M.TAMAJumpSpeed;
        gravity     = Game_M.TAMAGravity;

        mutekiTime = 2.0f;
        //初期座標の取得
        pos = this.transform.position;

        //ライフマネージャー取得
        canbas = GameObject.Find("Canvas");
        Life_M = canbas.GetComponent <LifeManager_M>();

        //キャラコンの取得
        controller = GetComponent <CharacterController>();
        //アニメーター宣言2
        animator = GetComponent <Animator>();

        isDead = false;
        isStop = false;

        ///////////////////////////////////////////
        audioSource = GetComponent <AudioSource>();
        //////////////////////////////////////////
    }
コード例 #2
0
    void Start()
    {
        //ゲームマネージャー取得
        gamemanager = GameObject.Find("GameManager");
        Game_M      = gamemanager.GetComponent <GameManager_M>();

        MainCamera = GameObject.Find("Main Camera");
        Life_M     = GetComponent <LifeManager_M>();
        //is3D = Maincamera.GetComponent<Camera>().orthographic;
        Timer3DBG = new GameObject("TimerBG");
        Timer3DBG.transform.parent = gameObject.transform;
        Timer3DBG.AddComponent <RectTransform>().anchoredPosition = new Vector2(-210, 200);
        Timer3DBG.GetComponent <RectTransform>().localScale       = new Vector3(1f, 1f, 1f);
        Timer3DBG.AddComponent <Image>().sprite         = Resources.Load <Sprite>("UI_rogo/TAMA_UI_TimerBG");
        Timer3DBG.GetComponent <Image>().enabled        = false;
        Timer3DBG.GetComponent <Image>().preserveAspect = true;
        Timer3DBG.GetComponent <Image>().SetNativeSize();

        Timer3D = new GameObject[FullTimer];
        for (int i = 0; i < FullTimer; i++)
        {
            Timer3D[i] = new GameObject("Timer" + i);
            Timer3D[i].transform.parent = gameObject.transform;
            Timer3D[i].AddComponent <RectTransform>().anchoredPosition = new Vector2(-300 + 27.5f * i, 177.5f);
            Timer3D[i].GetComponent <RectTransform>().localScale       = new Vector3(1f, 1f, 1f);
            Timer3D[i].AddComponent <Image>().sprite = Resources.Load <Sprite>("UI_rogo/TAMA_UI_TimerW");
            float xi = i;
            Timer3D[i].GetComponent <Image>().color          = new Color(1 - xi / (FullTimer - 1), xi / (FullTimer - 1), 0.4f);
            Timer3D[i].GetComponent <Image>().enabled        = false;
            Timer3D[i].GetComponent <Image>().preserveAspect = true;
            Timer3D[i].GetComponent <Image>().SetNativeSize();
        }
        time1 = 0;
        time0 = 0;
    }
コード例 #3
0
ファイル: PlayerManager_M.cs プロジェクト: ZaxisGame/TAMA
    void Start()
    {
        //ゲームマネージャー取得
        gamemanager = GameObject.Find("GameManager");
        Game_M      = gamemanager.GetComponent <GameManager_M>();
        //ライフマネージャー取得
        canbas = GameObject.Find("Canvas");
        Life_M = canbas.GetComponent <LifeManager_M>();

        tama       = GameObject.Find("TAMA");
        playerMove = tama.GetComponent <PlayerMove_M>();
    }
コード例 #4
0
 // Use this for initialization
 void Start()
 {
     Maincamera = GameObject.Find("Main Camera");
     gm         = GameObject.Find("GameManager");
     Cam_M      = gm.GetComponent <CameraManager_M>();
     Life_M     = GetComponent <LifeManager_M>();
     //is3D = Maincamera.GetComponent<Camera>().orthographic;
     Timer3D = new GameObject[FullTimer];
     for (int i = 0; i < FullTimer; i++)
     {
         Timer3D[i] = new GameObject("cat" + i);
         Timer3D[i].transform.parent = gameObject.transform;
         Timer3D[i].AddComponent <RectTransform>().anchoredPosition = new Vector2(-300 + 50 * i, 180);
         Timer3D[i].GetComponent <RectTransform>().localScale       = new Vector3(0.03f, 0.03f, 0.03f);
         Timer3D[i].AddComponent <Image>().sprite         = Resources.Load <Sprite>("Images_M/cat_icon");
         Timer3D[i].GetComponent <Image>().enabled        = false;
         Timer3D[i].GetComponent <Image>().preserveAspect = true;
         Timer3D[i].GetComponent <Image>().SetNativeSize();
     }
     time1 = 0;
     time0 = 0;
 }
コード例 #5
0
ファイル: Beam_M.cs プロジェクト: ZaxisGame/TAMA
 private void Start()
 {
     lifeManager = canvas.GetComponent <LifeManager_M>();
 }