Exemple #1
0
        /// <summary>
        /// Initialises a new instance of this class.
        /// </summary>
        public GenericNPC(ActorProperties properties)
        {
            this.properties = properties;

            this.tileset = new Tileset(16, 1, Convert.ToUInt16(properties.Properties["States"]));
            this.tileset.Load(GameBase.Singleton.Content, properties.Properties["Tileset"]);
        }
Exemple #2
0
        /// <summary>
        /// Initialises a new instance of this class.
        /// </summary>
        public OpponentNPC(ActorProperties properties)
        {
            this.properties = properties;

            this.tileset = new Tileset(16, 1, 1);
            this.tileset.Load(GameBase.Singleton.Content, properties.Properties["Tileset"]);
        }
Exemple #3
0
        private Actor CurrentLevel_OnCreateActor(ActorProperties properties)
        {
            switch (properties.Type)
            {
                case "GenericNPC":
                    {
                        GenericNPC genericNPC = new GenericNPC(properties);
                        genericNPC.CellPosition = new Vector2(properties.X, properties.Y);
                        return genericNPC;
                    }
                case "BridgeNPC":
                    {
                        BridgeNPC bridgeNPC = new BridgeNPC(properties);
                        bridgeNPC.CellPosition = new Vector2(properties.X, properties.Y);
                        return bridgeNPC;
                    }
                case "Vernado":
                    {
                        Vernado vernado = new Vernado(properties);
                        vernado.CellPosition = new Vector2(properties.X, properties.Y);
                        return vernado;
                    }
                case "Markus":
                    {
                        Markus markus = new Markus(properties);
                        markus.CellPosition = new Vector2(properties.X, properties.Y);
                        return markus;
                    }
                case "Maro":
                    {
                        Maro markus = new Maro(properties);
                        markus.CellPosition = new Vector2(properties.X, properties.Y);
                        return markus;
                    }
            }

            return null;
        }
Exemple #4
0
 /// <summary>
 /// Initialises a new instance of this class.
 /// </summary>
 public BridgeNPC(ActorProperties properties)
     : base(properties)
 {
 }
Exemple #5
0
 /// <summary>
 /// Initialises a new instance of this class.
 /// </summary>
 public Vernado(ActorProperties properties)
     : base(properties)
 {
 }
Exemple #6
0
 /// <summary>
 /// Initialises a new instance of this class.
 /// </summary>
 public Maro(ActorProperties properties)
     : base(properties)
 {
 }