/// <inheritdoc/>
 public Task Initialize()
 {
     if (IsInitialized)
     {
         return(Task.CompletedTask);
     }
     AvailableBehaviourTypes = ReflectionCache.FindTypes(type => type.IsSubclassOf(typeof(NPCBehaviourBase)) && !type.IsAbstract);
     IsInitialized           = true;
     Debug.Log($"{GetType().Name} scenario editor extension has been initialized.");
     return(Task.CompletedTask);
 }
예제 #2
0
    static TriggersManager()
    {
        var effectorTypes = ReflectionCache.FindTypes(type => type.IsSubclassOf(typeof(TriggerEffector)));

        foreach (var effectorType in effectorTypes)
        {
            if (Activator.CreateInstance(effectorType) is TriggerEffector effector)
            {
                EffectorNameToType.Add(effector.TypeName, effectorType);
            }
        }
    }
예제 #3
0
        /// <inheritdoc/>
        public override void Initialize()
        {
            var controllerTypes = ReflectionCache.FindTypes(type => type.IsSubclassOf(typeof(PlaybackController)));

            foreach (var controllerType in controllerTypes)
            {
                if (Activator.CreateInstance(controllerType) is PlaybackController controller)
                {
                    controllers.Add(controller);
                    controller.Initialize();
                }
            }

            timeSlider.SetValueWithoutNotify(0.0f);
        }