예제 #1
0
파일: GameObject.cs 프로젝트: MartyIX/SoTh
        /// <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);
        }
예제 #2
0
파일: Scene.cs 프로젝트: MartyIX/SoTh
 public Scene(View.GameDesk gameDesk)
 {
     this.gameDesk = gameDesk;
 }