コード例 #1
0
ファイル: Player.cs プロジェクト: zzzemma/EchoPrototype
        public void CreateEchoWave(GameTime gt)
        {
            var currentTime = (float)gt.TotalGameTime.TotalMilliseconds / 1000;

            if (currentTime - lastEchoTime > echoCoolDown)
            {
                lastEchoTime = currentTime;
                var echoWave = new EchoWave(gt, new Vector2(X, Y));
                echoWaves.Add(echoWave);
                echoWave.parent      = this;
                echoWave.spriteBatch = spriteBatch;
            }
        }
コード例 #2
0
        public void CreateEchoWave(GameTime gt)
        {
            var currentTime = (float)gt.TotalGameTime.TotalMilliseconds / 1000;

            if (currentTime - lastEchoTime > echoCoolDown)
            {
                lastEchoTime = currentTime;
                var echoWave = new EchoWave(gt, new Vector2(X, Y));
                echoWaves.Add(echoWave);
                echoWave.parent      = this;
                echoWave.spriteBatch = spriteBatch;
                var castSound = GameContent.instance.echoCast.CreateInstance();
                castSound.Volume = 0.2f;
                castSound.Play();
            }
        }