コード例 #1
0
ファイル: WorldController.cs プロジェクト: RyanB156/Tribe
        // Entity or Plant controller has added an object. Make sure this entity can have world scheduled events.
        private void Controller_AddGameObject(object sender, GameObjectEventArgs e)
        {
            e.gameObject.ScheduleEvent += OnScheduleEvent;

            if (e.gameObject is Item pickup)
            {
                Items.Add(pickup);
            }
        }
コード例 #2
0
ファイル: WorldController.cs プロジェクト: RyanB156/Tribe
 // Entity or Plant controller is removing an object. Make sure event hooks are removed.
 private void Controller_RemoveGameObject(object sender, GameObjectEventArgs e)
 {
     e.gameObject.ScheduleEvent -= OnScheduleEvent;
 }