コード例 #1
0
ファイル: BeerController.cs プロジェクト: jdcook/Veishea
 public BeerController(Game1 game, GameEntity entity)
     : base(game, entity)
 {
     physicalData = entity.GetSharedData(typeof(Entity)) as Entity;
     physicalData.IsAffectedByGravity = false;
     physicalData.CollisionInformation.Events.DetectingInitialCollision += HandleCollision;
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: jdcook/Veishea
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (Game1 game = new Game1())
     {
         game.Run();
     }
 }
コード例 #3
0
ファイル: RioterController.cs プロジェクト: jdcook/Veishea
 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);
 }
コード例 #4
0
ファイル: CameraComponent.cs プロジェクト: jdcook/Veishea
 public CameraComponent(Game1 game)
     : base(game)
 {
     this.UpdateOrder = 2;
     for (int i = 0; i < NUM_LIGHTS; ++i)
     {
         lightPositions[i] = inactiveLightPos;
     }
 }
コード例 #5
0
        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);
        }
コード例 #6
0
        /// <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);
        }
コード例 #7
0
ファイル: CarController.cs プロジェクト: jdcook/Veishea
 public CarController(Game1 game, GameEntity entity)
     : base(game, entity)
 {
     stupid = 35;
 }
コード例 #8
0
ファイル: StaticMeshComponent.cs プロジェクト: jdcook/Veishea
 public StaticMeshComponent(Game1 game, GameEntity entity)
     : base(game, entity)
 {
     this.collidable = Entity.GetSharedData(typeof(StaticMesh)) as StaticMesh;
 }
コード例 #9
0
ファイル: PlayerController.cs プロジェクト: jdcook/Veishea
 public PlayerController(Game1 game, GameEntity entity)
     : base(game, entity)
 {
     physicalData = entity.GetSharedData(typeof(Entity)) as Entity;
     anims = entity.GetSharedData(typeof(AnimationPlayer)) as AnimationPlayer;
 }
コード例 #10
0
ファイル: Component.cs プロジェクト: jdcook/Veishea
 public Component(Game1 game, GameEntity entity)
 {
     this.Game = game;
     this.Entity = entity;
     Remove = false;
 }
コード例 #11
0
ファイル: DrawableComponent3D.cs プロジェクト: jdcook/Veishea
 public DrawableComponent3D(Game1 game, GameEntity entity)
     : base(game, entity)
 {
     this.physicalData = entity.GetSharedData(typeof(Entity)) as Entity;
 }
コード例 #12
0
ファイル: ModelManager.cs プロジェクト: jdcook/Veishea
 public ModelManager(Game1 game)
     : base(game)
 {
     camera = game.Services.GetService(typeof(CameraComponent)) as CameraComponent;
     this.UpdateOrder = 3;
 }
コード例 #13
0
ファイル: PhysicsComponent.cs プロジェクト: jdcook/Veishea
 public PhysicsComponent(Game1 game, GameEntity entity)
     : base(game, entity)
 {
     this.collidable = entity.GetSharedData(typeof(Entity)) as Entity;
 }
コード例 #14
0
ファイル: LightPole.cs プロジェクト: jdcook/Veishea
 public LightPoleController(Game1 game, GameEntity entity)
     : base(game, entity)
 {
     stupid = 25;
 }
コード例 #15
0
ファイル: DesctructibleProp.cs プロジェクト: jdcook/Veishea
 public DestructibleProp(Game1 game, GameEntity entity)
     : base(game, entity)
 {
     physicalData = entity.GetSharedData(typeof(Entity)) as Entity;
     physicalData.CollisionInformation.Events.DetectingInitialCollision += HandleCollision;
 }
コード例 #16
0
 public GeneralComponentManager(Game1 game)
     : base(game)
 {
 }
コード例 #17
0
ファイル: EntityManager.cs プロジェクト: jdcook/Veishea
 public EntityManager(Game1 game)
     : base(game)
 {
     this.mainGame = game;
     camera = game.Services.GetService(typeof(CameraComponent)) as CameraComponent;
 }
コード例 #18
0
ファイル: MailboxController.cs プロジェクト: jdcook/Veishea
 public MailboxController(Game1 game, GameEntity entity)
     : base(game, entity)
 {
     stupid = 10;
 }