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);
    }
Example #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();
        }
    }
Example #3
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);
    }
Example #4
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");
        }
    }