public BeerController(Game1 game, GameEntity entity) : base(game, entity) { physicalData = entity.GetSharedData(typeof(Entity)) as Entity; physicalData.IsAffectedByGravity = false; physicalData.CollisionInformation.Events.DetectingInitialCollision += HandleCollision; }
/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (Game1 game = new Game1()) { game.Run(); } }
public RioterController(Game1 game, GameEntity entity) : base(game, entity) { physicalData = entity.GetSharedData(typeof(Entity)) as Entity; anims = entity.GetSharedData(typeof(AnimationPlayer)) as AnimationPlayer; playerData = game.GetPlayerEntity(); runSpeed = game.rand.Next(15, 28); }
public CameraComponent(Game1 game) : base(game) { this.UpdateOrder = 2; for (int i = 0; i < NUM_LIGHTS; ++i) { lightPositions[i] = inactiveLightPos; } }
public AnimatedModelComponent(Game1 game, GameEntity entity, Model model, float drawScale, Vector3 drawOffset) : base(game, entity) { this.model = model; this.localOffset = drawOffset; this.syncedModels = entity.GetSharedData(typeof(Dictionary<string, Model>)) as Dictionary<string, Model>; this.animationPlayer = entity.GetSharedData(typeof(AnimationPlayer)) as AnimationPlayer; animationPlayer.StartClip(animationPlayer.skinningDataValue.AnimationClips.Keys.First(), MixType.None); modelParams = new SharedGraphicsParams(); modelParams.size = new Vector3(drawScale); entity.AddSharedData(typeof(SharedGraphicsParams), modelParams); }
/// <summary> /// constructs a new model component for rendering models without animations /// </summary> public UnanimatedModelComponent(Game1 game, GameEntity entity, Model model, Vector3 drawScale, Vector3 localOffset, float yaw, float pitch, float roll) : base(game, entity) { this.model = model; this.localOffset = localOffset; modelParams = new SharedGraphicsParams(); modelParams.size = drawScale; entity.AddSharedData(typeof(SharedGraphicsParams), modelParams); this.yaw = yaw; this.pitch = pitch; this.roll = roll; Matrix3X3 bepurot = physicalData.OrientationMatrix; rotation = new Matrix(bepurot.M11, bepurot.M12, bepurot.M13, 0, bepurot.M21, bepurot.M22, bepurot.M23, 0, bepurot.M31, bepurot.M32, bepurot.M33, 0, 0, 0, 0, 1); }
public CarController(Game1 game, GameEntity entity) : base(game, entity) { stupid = 35; }
public StaticMeshComponent(Game1 game, GameEntity entity) : base(game, entity) { this.collidable = Entity.GetSharedData(typeof(StaticMesh)) as StaticMesh; }
public PlayerController(Game1 game, GameEntity entity) : base(game, entity) { physicalData = entity.GetSharedData(typeof(Entity)) as Entity; anims = entity.GetSharedData(typeof(AnimationPlayer)) as AnimationPlayer; }
public Component(Game1 game, GameEntity entity) { this.Game = game; this.Entity = entity; Remove = false; }
public DrawableComponent3D(Game1 game, GameEntity entity) : base(game, entity) { this.physicalData = entity.GetSharedData(typeof(Entity)) as Entity; }
public ModelManager(Game1 game) : base(game) { camera = game.Services.GetService(typeof(CameraComponent)) as CameraComponent; this.UpdateOrder = 3; }
public PhysicsComponent(Game1 game, GameEntity entity) : base(game, entity) { this.collidable = entity.GetSharedData(typeof(Entity)) as Entity; }
public LightPoleController(Game1 game, GameEntity entity) : base(game, entity) { stupid = 25; }
public DestructibleProp(Game1 game, GameEntity entity) : base(game, entity) { physicalData = entity.GetSharedData(typeof(Entity)) as Entity; physicalData.CollisionInformation.Events.DetectingInitialCollision += HandleCollision; }
public GeneralComponentManager(Game1 game) : base(game) { }
public EntityManager(Game1 game) : base(game) { this.mainGame = game; camera = game.Services.GetService(typeof(CameraComponent)) as CameraComponent; }
public MailboxController(Game1 game, GameEntity entity) : base(game, entity) { stupid = 10; }