Esempio n. 1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="form">Reference to the main form</param>
        /// <param name="model">Model to which the GameObject should belongs</param>
        /// <param name="objectID">Unique number for GameObject</param>
        /// <param name="description">See "description" member of GameObject</param>
        /// <param name="pozX">See "pozX" member of GameObject</param>
        /// <param name="pozY">See "pozY" member of GameObject</param>
        /// <param name="direction">See "direction" member of GameObject</param>
        /// <param name="InitialEvent">First event of GameObject</param>
        /// <param name="speed">Speed of GameObject - typically for monsters</param>
        public GameObject(View.GameDeskView form, Player player, int objectID, string description,
                          int posX, int posY, MovementDirection direction, EventType InitialEvent, int speed)
        {
            this.player = player;

            this.model = (player == null) ? null : player.model;
            this.gameDesk = (player == null) ? null : player.gameDesk;
            this.objectID = objectID;
            this.speed = speed;
            this.form = form;
            this.posX = posX;
            this.posY = posY;
            this.lastPosX = posX;
            this.lastPosY = posY;
            this.Description = description;

            movementStopWatch = null;

            if (this.model != null)
                inicialization(direction, InitialEvent);
        }
Esempio n. 2
0
 public Scene(View.GameDesk gameDesk)
 {
     this.gameDesk = gameDesk;
 }