public override void Start()
        {
            this.gm = GameManager.Instance;

            if (this.gm.IsFromInitialize)
            {
                this.gm.playElapsedTime = 0;

                this.pl1SM  = this.gm.PL1Managers.stageManager;
                this.pl2SM  = this.gm.PL2Managers.stageManager;
                this.pl1PM  = this.gm.PL1Managers.playerManager;
                this.pl2PM  = this.gm.PL2Managers.playerManager;
                this.pl1EM  = this.gm.PL1Managers.enemyManager;
                this.pl2EM  = this.gm.PL2Managers.enemyManager;
                this.pl1PBM = this.gm.PL1Managers.playerBulletManager;
                this.pl2PBM = this.gm.PL2Managers.playerBulletManager;
                this.pl1EBM = this.gm.PL1Managers.enemyBulletManager;
                this.pl2EBM = this.gm.PL2Managers.enemyBulletManager;

                // BGM: StageBGM
                AudioManager.Instance.PlayBgm(this.gm.GetStageBGM());

                this.gm.IsFromInitialize = false;
            }
        }
Esempio n. 2
0
            public Shooter(UFA1StraightEnemyScript.ShooterParam _param, EnemyBulletActorManager _manager, Transform _trans)
            {
                this.shotInterval = _param.shotInterval;

                this.elapsedTime = 0;
                this.shotTime    = 0;

                this.manager = _manager;
                this.trans   = _trans;
            }
Esempio n. 3
0
        public RiaEnemy(GameObject _go, RiaCharacterScript _script, PlayerNumber _playerNumber) : base(_go, _script, _playerNumber)
        {
            // CharacterScriptの上書き
            this.Script = _script as RiaEnemyScript;

            // キャッシュと初期化
            this.spRender        = this.Go.GetComponent <SpriteRenderer>();
            this.spRender.sprite = this.Script.Sprite;

            this.collider           = this.Go.GetComponent <Collider2D>();
            this.collider.isTrigger = true;

            this.colliderSupporter = this.Actor.ColliderSupporter;

            this.bulletManager = GameManager.Instance.GetEnemyBulletActorManager(this.PlayerNumber);

            // パラメータ
            /// 体力
            this.HitPoint = this.Script.HitPointMax;

            /// 画面外処理
            this.areaLeftLine = (this.PlayerNumber == PlayerNumber.player1) ?
                                PlayableArea.pl1AreaLeftLine :
                                PlayableArea.pl2AreaLeftLine;
            this.areaRightLine = (this.PlayerNumber == PlayerNumber.player1) ?
                                 PlayableArea.pl1AreaRightLine :
                                 PlayableArea.pl2AreaRightLine;

            // タグ
            this.playerTag = (this.PlayerNumber == PlayerNumber.player1) ?
                             TagEnum.Player1.ToDescription() :
                             TagEnum.Player2.ToDescription();
            this.playerBulletTag = (this.PlayerNumber == PlayerNumber.player1) ?
                                   TagEnum.PlayerBullet1.ToDescription() :
                                   TagEnum.PlayerBullet2.ToDescription();
        }