Exemple #1
0
        /// <summary>
        /// カーソルの用意
        /// </summary>
        private void InitCursor()
        {
            this.cursor = MyGameObject.Create <Cursor>("Cursor", this.folder);
            this.cursor.SetActive(false);

            SyncCursorPosition();
        }
Exemple #2
0
        /// <summary>
        /// 各種オブジェクトの生成、初期化
        /// </summary>
        public Player Init()
        {
            // プレースフォルダーを作成
            this.folder        = new GameObject("Player").transform;
            this.folder.parent = this.parent;

            // パズルを作成
            this.puzzle = new Puzzle(this.folder, this.Location.Paw);
            this.puzzle.Init();
            this.puzzle.OnVanished = OnVanished;

            // ゲージを生成
            var props = new Gauges.Props();

            props.Location = this.Location;
            props.Parent   = this.folder;

            this.gauges = new Gauges(props).Init();

            // 猫を生成
            this.cat = MyGameObject.Create <Cat>("Cat", this.folder);
            this.cat.CacheTransform.position = this.Location.Cat;
            this.cat.Init(this.catType, this.Type == Define.App.Player.P2);

            // ユニークスキルを生成
            this.unique = MyGameObject.Create <UniqueSkill>("Unique", this.folder);

            return(this);
        }
Exemple #3
0
 /// <summary>
 /// 肉球のセットアップ
 /// </summary>
 private void InitPaws()
 {
     // 肉球を生成
     for (int i = 0; i < Define.Versus.PAW_TOTAL; ++i)
     {
         var paw = MyGameObject.Create <Paw>("Paw", this.folder);
         paw.SetActive(false);
         this.paws[i] = paw;
     }
 }
Exemple #4
0
        //-------------------------------------------------------------------------
        // ライフサイクル

        protected override void MyAwake()
        {
            // ユニット生成
            this.cloud = MyGameObject.Create <Mover.Glow>("Cloud", CacheTransform);

            // 状態の構築
            this.state.Add(State.Idle);
            this.state.Add(State.Create, OnCreateEnter, OnCreateUpdate);
            this.state.Add(State.Strike, OnStrikeEnter, OnStrikeUpdte);
            this.state.Add(State.Clear, OnClearEnter, OnClearUpdate, OnClearExit);
            this.state.SetState(State.Idle);
        }
Exemple #5
0
        //-------------------------------------------------------------------------
        // ライフサイクル

        protected override void MyAwake()
        {
            // ユニット生成
            this.cutin = MyGameObject.Create <Mover.Glow>("CutIn", CacheTransform);

            // 状態の構築
            this.state.Add(State.Idle);
            this.state.Add(State.ExpandX, OnExpandXEnter, OnExpandXUpdate);
            this.state.Add(State.ExpandY, OnExpandYEnter, OnExpandYUpdate);
            this.state.Add(State.CutIn, OnCutInEnter, OnCutInUpdate, OnCutInExit);
            this.state.Add(State.Execute, OnExecuteEnter, OnExecuteUpdate, OnExecuteExit);
            this.state.SetState(State.Idle);
        }
Exemple #6
0
        //-------------------------------------------------------------------------
        // ライフサイクル

        protected override void MyAwake()
        {
            // 雷を生成
            for (int i = 0; i < THUNDER_COUNT; ++i)
            {
                this.movers[i] = MyGameObject.Create <Mover.Glow>("Thunder", CacheTransform);
            }

            // 状態の構築
            this.state.Add(State.Idle);
            this.state.Add(State.Flash, OnFlashEnter, OnFlashUpdate, OnFlashExit);
            this.state.SetState(State.Idle);
        }
Exemple #7
0
        //-------------------------------------------------------------------------
        // ライフサイクル

        protected override void MyAwake()
        {
            // MainとGlowのSpriteオブジェクトを生成
            this.main = MyGameObject.Create <SpriteRenderer>("Main", CacheTransform);
            this.main.sortingOrder = Define.Layer.Order.Layer00;

            this.glow = MyGameObject.Create <SpriteRenderer>("Glow", CacheTransform);
            this.glow.sortingOrder = Define.Layer.Order.Layer00 + 1;

            // 状態の構築
            this.state.Add(State.Idle);
            this.state.Add(State.Usual, OnUsualEnter, OnUsualUpdate, OnUsualExit);
            this.state.SetState(State.Idle);
        }
Exemple #8
0
        //-------------------------------------------------------------------------
        // ライフサイクル

        protected override void MyAwake()
        {
            // MainとGlowのSpriteオブジェクトを生成
            this.main = MyGameObject.Create <SpriteRenderer>("Main", CacheTransform);
            this.main.sortingOrder = Define.Layer.Order.Layer00;

            this.glow = MyGameObject.Create <SpriteRenderer>("Glow", CacheTransform);
            this.glow.sortingOrder = Define.Layer.Order.Layer00 + 1;

            this.op.SetMover(this);
            this.op.OnIdle = () => { OnIdle?.Invoke(this); };

            // デフォルトでFlashは無効
            this.op.DisableFlash();
        }
Exemple #9
0
        //-------------------------------------------------------------------------
        // ライフサイクル

        protected override void MyAwake()
        {
            // Component取得
            this.spriteRenderer = MyGameObject.Create <SpriteRenderer>("Sprite", CacheTransform);

            // Status:Freeze→Paralysis→Invisibleの順で登録する
            this.status.Add(new StatusFreeze(CacheTransform));
            this.status.Add(new StatusParalysis(CacheTransform));
            this.status.Add(new StatusInvisible(this));

            // 相手のパズルと入れ替えを行う者
            this.swapExecutor = new SwapExecutor(this);

            // 状態構築
            this.state.Add(State.Idle, OnIdleEnter);
            this.state.Add(State.Vanish, OnVanishEnter, OnVanishUpdate, OnVanishExit);
            this.state.Add(State.Move, OnMoveEnter, OnMoveUpdate, OnMoveExit);
            this.state.Add(State.Usual, OnUsualEnter);
            this.state.Add(State.Selected, OnSelectedEnter, OnSelectedUpdate);
            this.state.SetState(State.Idle);
        }