Example #1
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Level"/> class.
        /// </summary>
        public Level(GameMode GameMode)
        {
            this.GameMode = GameMode;

            this.AchievementManager = new AchievementManager(this);
            this.CommandManager     = new CommandManager(this);
            this.EventManager       = new EventManager(this);
            this.FootstepManager    = new FootstepManager(this);
            this.HeroManager        = new HeroManager(this);
            this.MissionManager     = new MissionManager(this);
            this.SpellManager       = new SpellManager(this);
            this.TraderManager      = new TraderManager(this);
        }
Example #3
0
 public Footstep(FootstepManager footstepManager, AudioSource audioSource)
 {
     this.m_footstepManager = footstepManager;
     this.m_audioSource     = audioSource;
 }