protected override void Awake()
    {
        base.Awake();
        //m_Chips = new UnitAtk[30];

        m_status.szName = "Player";

        m_fMaxChargeTime = 2.8f;

        m_status.nMaxHp     = 100;
        m_status.nCurHp     = m_status.nMaxHp;
        m_status.fMoveSpeed = 5.0f;

        m_baseAtk.nDmg    = 1;
        m_baseAtk.nID     = 0;
        m_baseAtk.fSpeed  = 1.0f;
        m_baseAtk.eType   = (E_TYPE)0;
        m_baseAtk.objType = ElementMgr.GetInst().GetElement((int)E_ATKELEMENT.BULLET);

        this.m_anim    = gameObject.GetComponent <Animator> ();
        m_bodyMaterial = Resources.Load <Material> ("Materials/Unit/Material1");
        m_goBuster     = transform.Find("WeaponArm").gameObject;
        m_BusterMesh   = m_goBuster.GetComponent <SkinnedMeshRenderer>();
        InitializeDelegate();

        m_goCharge    = transform.Find("Charge").gameObject;
        m_goChargeMax = transform.Find("ChargeMax").gameObject;
        m_goChargeAtk = ElementMgr.GetInst().GetElement((int)E_ATKELEMENT.CHARGEBULLET);
    }
Exemplo n.º 2
0
    // Use this for initialization
    protected void Start()
    {
        DBMgr.GetInst().OpenConnection();

        m_audioBgm.enabled = false;

        MapMgr.Inst.Initialize();
        MapMgr.Inst.CreateMap();

        CamMgr.GetInst().Initialize();
        ObjectPool.GetInst().Initialzie();
        EffectMgr.GetInst().Initailzie();
        ElementMgr.GetInst().Initialize();
        ChipMgr.Inst.Initialize();
        UnitMgr.Inst.Initialize();

        EffectMgr.GetInst().SetEffectPooled();
        ObjectPool.GetInst().CreatePool();

        if (MultyManager.Inst == null)
        {
            StartCoroutine(UnitMgr.Inst.GenUnit());
            UnitMgr.Inst.EnemyPlay();
        }
    }
Exemplo n.º 3
0
 public static void InitInst()
 {
     if (m_Inst == null)
     {
         m_Inst = new ElementMgr();
     }
 }
Exemplo n.º 4
0
    protected override void Awake()
    {
        base.Awake();

        m_anim = transform.GetComponent <Animator> ();

        m_status.nMaxHp     = 40;
        m_status.nCurHp     = m_status.nMaxHp;
        m_status.fMoveSpeed = 5.0f;

        m_baseAtk.nDmg    = 10;
        m_baseAtk.eType   = E_TYPE.NONE;
        m_baseAtk.fSpeed  = 3.0f;
        m_baseAtk.objType = ElementMgr.GetInst().GetElement((int)E_ATKELEMENT.WAVE);

        m_AI.SetUnit(this);
    }
Exemplo n.º 5
0
    public virtual void ReleaseStage()
    {
        UIMgr.Inst.ClearChip();
        UIMgr.Inst.ClearSelectedIcons();
        UIMgr.Inst.ClearUseChips();
        UnitMgr.Inst.ReleaseUnit();
        EffectMgr.GetInst().ReleaseEffect();
        ElementMgr.GetInst().ReleaseElement();
        ChipMgr.Inst.ReleaseChipList();
        DBMgr.GetInst().CloseConnection();
        ObjectPool.GetInst().ReleasePooled();
        System.GC.Collect();

        if (MultyManager.Inst == null)
        {
            UnityEngine.SceneManagement.SceneManager.LoadScene("MainScene");
        }
    }
Exemplo n.º 6
0
    protected void Awake()
    {
        if (m_inst != null)
        {
            Destroy(gameObject);
            return;
        }

        m_inst = this;

        DBMgr.InitInst();
        MapMgr.InitInst();
        UnitMgr.InitInst();
        EffectMgr.InitInst();
        ElementMgr.InitInst();
        ChipMgr.InitInst();
        ObjectPool.InitInst();
        CamMgr.InitInst();

        m_audioBgm        = transform.GetComponent <AudioSource> ();
        m_clipDeleteEnemy = Resources.Load <AudioClip> ("Sound/Bgm/EnemyDeleted");
        m_clipGameover    = Resources.Load <AudioClip> ("Sound/Bgm/Gameover");
    }