Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        if (DebugMode)
        {
            sf = StageFlags.AllSF;
        }
        else
        {
            //ステージのクリアデータを取得
            string data = "STAGE_FLAG_" + WorldNum.ToString();
            sf = (StageFlags)PlayerPrefs.GetInt(data, 0);
            Debug.Log("データ名:" + data);
        }

        //動かすコンポネ取得
        SSCM = SSCursor.GetComponent <CursorMove>();

        //フェードパネルとUIの親取得
        FadeObj = GameObject.Find("FadePanel").GetComponent <FadeManager>();

        //無条件解放
        stages[NowSelStage].GetComponent <StaUnl>().SetUnlockFlg(true);
        stages[NowSelStage].GetComponent <StaUnl>().OpenAnim();
        SSCM.transform.position = stages[NowSelStage].transform.position;

        //ステージ名設定
        StageNumText.text  = WorldNum.ToString() + " ー " + (NowSelStage + 1).ToString();
        StageNameText.text = stages[NowSelStage].GetComponent <StaUnl>().GetStageName();

        //サウンド
        Source = GetComponent <AudioSource>();
    }
Пример #2
0
        public void InvokeCursorMove(Vector2 cursorPosition, Vector2 previousCursorPosition, bool isCursorDown)
        {
            var relativeNew = (cursorPosition - RenderPosition).ToPoint();
            var relativeOld = (previousCursorPosition - RenderPosition).ToPoint();

            CursorMove?.Invoke(this, new GuiCursorMoveEventArgs(relativeNew, relativeOld, isCursorDown));

            OnCursorMove(relativeNew, relativeOld, isCursorDown);
        }
    // Use this for initialization
    void Start()
    {
        c = GameObject.Find ("P1").GetComponent<CursorMove> ();
        box1 = GameObject.Find ("P1 Collider");
        box2 = GameObject.Find ("P2 Collider");

        if (c.solo) {
            box1.SetActive (false);
            box2.SetActive (false);
        }
    }
Пример #4
0
        protected virtual bool HideCusor(ConsoleKeyInfo keyInfo)
        {
            if (CursorPosition == null)
            {
                return(false);
            }

            var old = CursorPosition;

            CursorPosition = null;

            var args = new CursorInformation(old, CursorPosition, keyInfo);

            return(CursorMove?.Invoke(this, args) ?? true);
        }
Пример #5
0
        protected virtual bool CursorUp(ConsoleKeyInfo keyInfo)
        {
            if (CursorPosition == null)
            {
                CursorPosition = _windows.Skip(_page * ITEMS_PER_PAGE).Take(ITEMS_PER_PAGE)
                                 .Count();
            }

            if (CursorPosition <= 0)
            {
                return(false);
            }

            var old = CursorPosition--;

            var args = new CursorInformation(old, CursorPosition, keyInfo);

            return(CursorMove?.Invoke(this, args) ?? true);
        }
Пример #6
0
    // Use this for initialization
    void Start()
    {
        //initializing needed variables
        playerNumber = GetComponent<CursorMove> ();
        a = GameObject.Find ("Player Fire").GetComponent<AudioSource> ();
        r = GameObject.Find ("Reload").GetComponent<AudioSource> ();
        canFire = true;
        canShield = true;
        ammo = 5;
        ammoScale = 5;
        shieldHit = 0;

        //if playing solo, use the bigger and stronger shield
        //else use the smaller and weaker shield
        if (playerNumber.solo) {
            shieldIndex = 1;
            shieldMaxHit = 6;
        }
        else {
            shieldIndex = 0;
            shieldMaxHit = 3;
        }
    }
Пример #7
0
    // Use this for initialization
    void Start()
    {
        playerNumber = GetComponent<CursorMove> ();
        a = GameObject.Find ("Player Fire").GetComponent<AudioSource> ();
        r = GameObject.Find ("Reload").GetComponent<AudioSource> ();
        canFire = true;
        canShield = true;
        ammo = 5;
        ammoScale = 5;
        shieldHit = 0;

        if (playerNumber.solo)
            shieldIndex = 1;
        else
            shieldIndex = 0;
    }