Example #1
0
    void Awake()
    {
        XLogger.LogValidObject(m_parent == null, LibConstants.ErrorMsg.GetMsgNotBoundComponent("Parent"), gameObject);
        XLogger.LogValidObject(m_bullet == null, LibConstants.ErrorMsg.GetMsgNotBoundComponent("Bullte"), gameObject);
        XLogger.LogValidObject(m_bulletBouquet == null, LibConstants.ErrorMsg.GetMsgNotBoundComponent("BullteBouquet"), gameObject);
        XLogger.LogValidObject(m_hitPoint == null, LibConstants.ErrorMsg.GetMsgNotBoundComponent("HitPoint"), gameObject);

        XLogger.LogValidObject(m_efReload == null, LibConstants.ErrorMsg.GetMsgNotBoundComponent("Effect Reload"), gameObject);
        XLogger.LogValidObject(m_efMaxCharge == null, LibConstants.ErrorMsg.GetMsgNotBoundComponent("Effect MaxCharge"), gameObject);

        m_magazine     = this.GetComponent <LauncherMagazine>();
        m_lineRenderer = this.GetComponent <LineRenderer>();

        GameObject efCharging  = XFunctions.InstanceChild(m_efCharging, Vector3.zero, Quaternion.identity, this.gameObject);
        GameObject efObj       = XFunctions.InstanceChild(m_efMaxCharge, Vector3.zero, Quaternion.identity, this.gameObject);
        GameObject efReloadObj = XFunctions.InstanceChild(m_efReload, Vector3.zero, Quaternion.identity, this.gameObject);

        m_csEfCharging  = efCharging.GetComponent <IEffect>();
        m_csEfMaxCharge = efObj.GetComponent <IEffect>();
        m_csEfReload    = efReloadObj.GetComponent <IEffect>();
    }