Esempio n. 1
0
 public virtual void Initialize()
 {
     resourcesMgr    = GameMainProgram.Instance.resourcesMgr;
     WeaponCollider  = GetComponent <Collider>();
     AttackFactor    = 1;
     VelocityForward = 7;
 }
 /// 注意单例类的构造函数必须是private的,这样才能确保类只有一个对象,不让外部类实例化该类
 private GameMainProgram()
 {
     // 构造
     resourcesMgr = new ResourcesMgr(this);
     fileMgr      = new FileMgr(this);
     dataBaseMgr  = new DataBaseMgr(this);
     gameDataMgr  = new GameDataMgr(this);
     languageMgr  = new LanguageMgr(this);
     playerMgr    = new PlayerMgr(this);
     enemyMgr     = new EnemyMgr(this);
     uiManager    = new UIManager(this);
     uiMaskMgr    = new UIMaskMgr(this);
     eventMgr     = new EventMgr(this);
     courseMgr    = new CourseMgr(this);
 }
Esempio n. 3
0
 /// 注意单例类的构造函数必须是private的,这样才能确保类只有一个对象,不让外部类实例化该类
 private GameMainProgram()
 {
     // 构造
     resourcesMgr = new ResourcesMgr(this);
     fileMgr      = new FileMgr(this);
     dataBaseMgr  = new DataBaseMgr(this);
     gameDataMgr  = new GameDataMgr(this);
     languageMgr  = new LanguageMgr(this);
     playerMgr    = new PlayerMgr(this);
     enemyMgr     = new EnemyMgr(this);
     npcMgr       = new NpcMgr(this);
     uiManager    = new UIManager(this);
     uiMaskMgr    = new UIMaskMgr(this);
     eventMgr     = new EventMgr(this);
     courseMgr    = new CourseMgr(this);
     audioMgr     = new AudioMgr(this);
     dialogMgr    = new DialogMgr(this);
     sqlMgr       = new SqlMgr(this);
     threadMgr    = new ThreadMgr(this);
 }
Esempio n. 4
0
 public override void Initialize()
 {
     base.Initialize();
     resourcesMgr = GameMainProgram.Instance.resourcesMgr;
     FindTarget();
 }