コード例 #1
0
ファイル: Enemy.cs プロジェクト: Pyroglyph/Dual
        public Enemy(Type type)
        {
            EnemyType = type;

            //  Pick random spawnpoint from current map's spawns
            Loc = World.CurrentMap.EnemySpawnPoints
                [new Random().Next(
                    0,
                    World.CurrentMap.EnemySpawnPoints.Length - 1
                    )];

            // set animation
            if (type == Type.Blob)
            {
                CurrentAnimation = Animations[(int)Type.Blob];
            }
        }
コード例 #2
0
ファイル: Weapon.cs プロジェクト: Pyroglyph/Dual
 public Weapon(WeaponType type)
 {
     Type = type;
     CurrentAnimation = Animations[(int) Type];
 }