예제 #1
0
        ///<summary>
        ///initialize using associated entity
        ///</summary>
        ///<param name="entity">associated entity</param>
        public void Initialize(Entity entity)
        {
            _triggerOnButtonSendMsg = entity as TriggerOnButtonSendMsg;

            SetClosed();

            Layer = 30;
            IsTemplate = false;
            Size = new Vector2(16, 16);
        }
예제 #2
0
파일: Map.cs 프로젝트: funkjunky/Raven
        ///<summary>
        ///Add a door trigger using given door trigger data
        ///</summary>
        ///<param name="doorTriggerData"></param>
        public void AddDoorTrigger(DoorTriggerData doorTriggerData)
        {
            TriggerOnButtonSendMsg tr =
                new TriggerOnButtonSendMsg(doorTriggerData);

            TriggerSystem.Register(tr);

            //register the entity
            EntityManager.Instance.RegisterEntity(tr);
        }