Example #1
0
 public DefenseAnimation(PawnModelComponent targetUnit, MasterSound masterSound) : base(targetUnit)
 {
     _masterSound = masterSound;
     foreach (Transform childTransform in targetUnit.transform)
     {
         if (childTransform.name.Equals("UnitSprite")) //todo TL3
         {
             _renderer = (childTransform.GetComponent <SpriteRenderer>());
         }
     }
     _startTime = Time.time;
 }
Example #2
0
        public Monsters(ContentManager _content, string _monsterTextureName, int _windowWidth, int _windowHeight)
        {
            content            = _content;
            monsterTextureName = _monsterTextureName;

            windowWidth  = _windowWidth;
            windowHeight = _windowHeight;

            initMonsters();

            monstersMovment = new MonstersMovment(monsters, 800, 10);
            monstersMovment.StartMovment();

            monsterGotHitSounds = new MasterSound(_content, Sounds.MONSTER_WAS_HIT);
        }
Example #3
0
        public Gun(ContentManager content, string textureName, string arrowTextureName, Point startLoc, Size spaceshipSize, int speed, int winHeight, int winWidth)
            : base(content, textureName, startLoc, speed, winHeight, winWidth)
        {
            this.content          = content;
            this.arrowTextureName = arrowTextureName;

            this.ArrowList = new List <Arrow>();

            orignalLocation = new Point(location.X, location.Y);
            SpaceshipSize   = spaceshipSize;

            fpsTimer = new FpsTimer(30);
            fpsTimer.TheFunctionToRun = ShootingAnimation;
            fpsTimer.StartTimer();


            gunShotSound = new MasterSound(content, Sounds.GUN_SHOT);
        }
Example #4
0
 public WindMagicUsageAnimation(GameObject tile, CameraShake shake, MasterSound masterSound)
 {
     _tile        = tile;
     _shake       = shake;
     _masterSound = masterSound;
 }
Example #5
0
        public MagicUsage(MagicType type, MyHexPosition position, GameCourseModel model, MyPlayer player, CameraShake cameraShake, MasterSound masterSound)
        {
            _type            = type;
            _position        = position;
            _player          = player;
            _model           = model;
            _magicUsageEnded = false;

            if (type == MagicType.Earth) //todo ugly, should not be if, rather should be polymorphism
            {
                _animation = new EarthMagicUsageAnimation(model.GetTileAt(position).gameObject, cameraShake, masterSound);
            }
            else
            {
                _animation = new WindMagicUsageAnimation(model.GetTileAt(position).gameObject, cameraShake, masterSound);
            }
            _animation.StartAnimation();
        }
Example #6
0
 public IAnimation EngagementAnimation(GameCourseModel courseMode, MasterSound sound, PawnModelComponent active, PawnModelComponent passive) => _effectUsageAnimationGenerator(courseMode, sound, active, passive);