Esempio n. 1
0
        public static InvWeapon CreateStakegun(Spatial launchNode, PhysicsBody ignoreBody)
        {
            WeaponDef weapDef = new WeaponDef();

            weapDef.name = "Stakegun";
            weapDef.primaryRefireTime   = 0.2f;
            weapDef.secondaryRefireTime = 2;
            weapDef.primaryPrjCount     = 1;
            weapDef.secondaryPrjCount   = 4;
            weapDef.magazineSize        = 4;

            ProjectileDef primaryPrjDef = new ProjectileDef();

            primaryPrjDef.damage      = 25;
            primaryPrjDef.launchSpeed = 50;
            primaryPrjDef.timeToLive  = 2;
            primaryPrjDef.prefabPath  = GameFactory.Path_StakeProjectile;

            ProjectileDef secondaryPrjDef = new ProjectileDef();

            secondaryPrjDef.damage      = 25;
            secondaryPrjDef.launchSpeed = 50;
            secondaryPrjDef.timeToLive  = 2;
            secondaryPrjDef.prefabPath  = GameFactory.Path_StakeProjectile;

            InvWeapStakegun weapon = new InvWeapStakegun(launchNode, weapDef, primaryPrjDef, secondaryPrjDef, ignoreBody);

            return(weapon);
        }
Esempio n. 2
0
        public static IEquippable CreateStakegun(Spatial launchNode, PhysicsBody ignoreBody)
        {
            WeaponDef weapDef = new WeaponDef();

            weapDef.name = "Stakegun";
            weapDef.primaryRefireTime   = 0.3f;
            weapDef.secondaryRefireTime = 2;
            weapDef.primarySpread       = new Vector2();
            weapDef.secondarySpread     = new Vector2(600, 400);
            weapDef.primaryPrjCount     = 1;
            weapDef.secondaryPrjCount   = 4;
            weapDef.magazineSize        = 4;

            ProjectileDef primaryPrjDef = new ProjectileDef();

            primaryPrjDef.damage      = 50;
            primaryPrjDef.launchSpeed = 150;
            primaryPrjDef.timeToLive  = 2;
            primaryPrjDef.prefabPath  = GameFactory.Path_StakeProjectile;
            primaryPrjDef.destroyMode = ProjectileDef.DestroyMode.Embed;

            InvWeapStakegun weapon = new InvWeapStakegun(launchNode, weapDef, primaryPrjDef, primaryPrjDef, ignoreBody);

            return(weapon);
        }