Inheritance: MonoBehaviour
Example #1
0
 public StandardRoom()
 {
     WasVisited = false;
     HasPillar  = false;
     Potion     = PotionFactory.MakeRandomPotion();
     Trap       = TrapFactory.MakeRandomTrap();
     Enemy      = MonsterFactory.MakeRandomMonster();
 }
Example #2
0
    private void Awake()
    {
        this.gameObject.AddComponent <TrapFactory>();

        trapFactory = GetComponent <TrapFactory>();

        m_tileManager = TileManager.Instance;
        traps         = new List <GameObject>();
        trapInfoList  = new List <Trap>();
        stageTraps    = new List <List <TrapData> >();
    }
Example #3
0
    private void Awake()
    {
        FoodController         = GameObject.Find("FoodController").GetComponent <FoodController>();
        DamageSystemController = GameObject.Find("DamageSystemController").GetComponent <DamageSystemController>();
        LifeSystemController   = GameObject.Find("LifeSystemController").GetComponent <LifeSystemController>();
        SoundController        = GameObject.Find("SoundController").GetComponent <SoundController>();
        GameController         = GameObject.Find("GameController").GetComponent <GameController>();
        MenuController         = GameObject.Find("MenuController").GetComponent <MenuController>();
        EnemyController        = GameObject.Find("EnemyController").GetComponent <EnemyController>();

        foodFactory          = GameObject.Find("FoodFactory").GetComponent <FoodFactory>();
        lifeFactory          = GameObject.Find("LifeFactory").GetComponent <LifeFactory>();
        trapFactory          = GameObject.Find("TrapFactory").GetComponent <TrapFactory>();
        energyCapsuleFactory = GameObject.Find("EnergyCapsuleFactory").GetComponent <EnergyCapsuleFactory>();
        rockFactory          = GameObject.Find("RockFactory").GetComponent <RockFactory>();
    }
Example #4
0
    void Awake()
    {
        PlatformType = PlatformType.Local;
#if (UNITY_ANDROID && !UNITY_EDITOR)
#if ANDROID_OPPO
        PlatformType = PlatformType.OPPO;
#elif ANDROID_UC
        PlatformType = PlatformType.UC;
#elif ANDROID_XIAOMI
        PlatformType = PlatformType.MI;
#elif ANDROID_TENCENT
        PlatformType = PlatformType.Tencent;
#endif
#endif
        TraceUtil.Log(PlatformType);
        Application.targetFrameRate = 60;

        m_instance = this;
        this.m_timedSendPackage = GetComponent <TimedSendPackage>();
        this.m_playerFactory    = GetComponent <PlayerFactory>();
        //this.m_monsterFactory = GetComponent<MonsterFactory>();
        this.m_damageFactory     = GetComponent <DamageFactory>();
        this.m_trapFactory       = GetComponent <TrapFactory>();
        this.m_portalFactory     = GetComponent <PortalFactory>();
        this.m_npcFactory        = GetComponent <NPCFactory>();
        this.m_SenceAudioFactory = GetComponent <SenceAudioFactory>();
        //this.m_bulletFactory = GetComponent<BulletFactory>();
        this.m_actionEffectFactory = GetComponent <ActionEffectFactory>();

        LoginManager.Instance.Init91();
        this.RegisterEventHandler();

        this.m_gameSettings = GetComponent <GameSettings>();

        //打印按钮Id
        TraceUtil.Log(SystemModel.Common, TaskBtnManager.Instance.GetBtnId());
    }
Example #5
0
 private void OnEnable()
 {
     _platformFactory = new PlatformFactory();
     _trapFactory     = new TrapFactory();
     spawnPosition    = Vector3.zero;
 }