コード例 #1
0
ファイル: ArenaSkybox.cs プロジェクト: CaKlassen/Titanium
        /// <summary>
        /// This is the default constructor for the arena skybox.
        /// </summary>
        /// <param name="createTile">The tile to centre on</param>
        /// <param name="Content">The content manager for loading</param>
        public ArenaSkybox(Tile createTile, ContentManager Content)
        {
            _currentTile = createTile;
            _Position = new Vector3(_currentTile.getModelPos().X, 0, _currentTile.getModelPos().Z); //should start in the middle of the start tile (X, Y, Z);

            //_Position = Vector3.Zero;
            scale = 80f;

            modelPosition = new Vector3(_currentTile.getModelPos().X, 0, _currentTile.getModelPos().Z);//models position appears on the start tile.

            myModel = Content.Load<Model>("Models/skybox");
            texture = Content.Load<Texture2D>("Models/skyboxBG");
        }
コード例 #2
0
ファイル: ArenaTable.cs プロジェクト: CaKlassen/Titanium
        /// <summary>
        /// This is the default constructor for the arena table.
        /// </summary>
        /// <param name="createTile">The tile to start on</param>
        /// <param name="Content">The content manager for loading</param>
        public ArenaTable(Tile createTile, ContentManager Content)
        {
            _currentTile = createTile;
            _Position = new Vector3(_currentTile.getModelPos().X, -20, _currentTile.getModelPos().Z); //should start in the middle of the start tile (X, Y, Z);

            //_Position = Vector3.Zero;
            _forward = ForwardDir.UP;
            scale = 2f;

            modelPosition = new Vector3(_currentTile.getModelPos().X, -40, _currentTile.getModelPos().Z);//models position appears on the start tile.

            myModel = Content.Load<Model>("Models/table");
            myTexture = Content.Load<Texture2D>("Models/UVMap-Table");
        }
コード例 #3
0
ファイル: Character.cs プロジェクト: CaKlassen/Titanium
        /// <summary>
        /// default constructor.
        /// </summary>
        public Character()
        {
            _StartTile = ArenaScene.instance.getStartTile();
            _currentTile = _StartTile;
            _Position = new Vector3(_StartTile.getModelPos().X, 0, _StartTile.getModelPos().Z); //should start in the middle of the start tile (X, Y, Z);

            _forward = ForwardDir.UP;

            rotAngle = MathHelper.ToRadians(180);
            scale = 0.5f;

            modelRotation = rotAngle;

            myModel = null;
            stepsTaken = 0;
        }
コード例 #4
0
ファイル: ArenaEnemy.cs プロジェクト: CaKlassen/Titanium
        /// <summary>
        /// This is the default constructor for the arena enemy.
        /// </summary>
        /// <param name="createTile">The tile to start on</param>
        /// <param name="Content">The content manager for loading</param>
        public ArenaEnemy(Tile createTile, ContentManager Content, PartyUtils.Enemy type)
        {
            // Add this to the collidables list
            ArenaScene.instance.collidables.Add(this);

            _currentTile = createTile;
            _Position = new Vector3(_currentTile.getModelPos().X, 0, _currentTile.getModelPos().Z); //should start in the middle of the start tile (X, Y, Z);

            scale = 0.5f;

            // Set the wait turns randomly
            waitTurns = ArenaController.instance.getGenerator().Next(1, WAIT_TURNS + 1);

            this.type = type;

            myModel = Content.Load<Model>("Models/hero");

            setTexture(Content);
        }