Exemplo n.º 1
0
    public void Awake()
    {
        //Component Initialisation
        m_ShipMoveBehavior = GetComponent<ShipMoveBehavior>();
        m_ShipCameraBehavior = GetComponent<ShipCameraBehavior>();
        m_ShipStateAndDamageBehavior = GetComponent<ShipStateAndDamageBehavior>();
        m_ShipDeathBehavior = GetComponent<ShipDeathBehavior>();
        m_ShipKillBehavior = GetComponent<ShipKillBehavior>();
        m_ShipLevelingBehavior = GetComponent<ShipLevelingBehavior>();
        m_ShipTresorBehavior = GetComponent<ShipTresorBehavior>();
        m_ShipMaterialBehavior = GetComponent<ShipMaterialBehavior>();
        m_ShipEquipementBehavior = GetComponent<ShipEquipementBehavior>();
        m_ShipDashBehavior = GetComponent<ShipDashBehavior>();
        m_ShipViewPoint = GetComponent<ShipViewPoint>();
        m_ShipEffectsBehavior = GetComponent<ShipEffectsBehavior>();
        m_ShipSpurBehavior = GetComponent<ShipSpurBehavior>();

        if (m_ShipMoveBehavior == null) { Debug.LogError("Miss m_ShipMoveBehavior") ;}
        if (m_ShipCameraBehavior == null) { Debug.LogError("Miss m_ShipCameraBehavior"); }
        if (m_ShipStateAndDamageBehavior == null) { Debug.LogError("Miss m_ShipStateAndDamageBehavior"); }
        if (m_ShipDeathBehavior == null) { Debug.LogError("Miss m_ShipDeathBehavior"); }
        if (m_ShipKillBehavior == null) { Debug.LogError("Miss m_ShipKillBehavior"); }
        if (m_ShipLevelingBehavior == null) { Debug.LogError("Miss m_ShipLevelingBehavior"); }
        if (m_ShipTresorBehavior == null) { Debug.LogError("Miss m_ShipTresorBehavior"); }
        if (m_ShipMaterialBehavior == null) { Debug.LogError("Miss m_ShipMaterialBehavior"); }
        if (m_ShipEquipementBehavior == null) { Debug.LogError("Miss m_ShipEquipementBehavior"); }
        if (m_ShipDashBehavior == null) { Debug.LogError("Miss m_ShipDashBehavior"); }
        if (m_ShipViewPoint == null) { Debug.LogError("Miss m_ShipViewPoint"); }
        if (m_ShipSpurBehavior == null) { Debug.LogError("Miss m_ShipSpurBehavior"); }

        //For UI
        if (m_IsGreen)
        {
            UICamera.cullingMask = LayerGreen;
        }
        else
        {
            UICamera.cullingMask = LayerOrange;
        }

        //For System
        m_ShipLevel = 1;
    }
Exemplo n.º 2
0
    public void Awake()
    {
        //Component Initialisation
        m_ShipMoveBehavior           = GetComponent <ShipMoveBehavior>();
        m_ShipCameraBehavior         = GetComponent <ShipCameraBehavior>();
        m_ShipStateAndDamageBehavior = GetComponent <ShipStateAndDamageBehavior>();
        m_ShipDeathBehavior          = GetComponent <ShipDeathBehavior>();
        m_ShipKillBehavior           = GetComponent <ShipKillBehavior>();
        m_ShipLevelingBehavior       = GetComponent <ShipLevelingBehavior>();
        m_ShipTresorBehavior         = GetComponent <ShipTresorBehavior>();
        m_ShipMaterialBehavior       = GetComponent <ShipMaterialBehavior>();
        m_ShipEquipementBehavior     = GetComponent <ShipEquipementBehavior>();
        m_ShipDashBehavior           = GetComponent <ShipDashBehavior>();
        m_ShipViewPoint       = GetComponent <ShipViewPoint>();
        m_ShipEffectsBehavior = GetComponent <ShipEffectsBehavior>();
        m_ShipSpurBehavior    = GetComponent <ShipSpurBehavior>();

        if (m_ShipMoveBehavior == null)
        {
            Debug.LogError("Miss m_ShipMoveBehavior");
        }
        if (m_ShipCameraBehavior == null)
        {
            Debug.LogError("Miss m_ShipCameraBehavior");
        }
        if (m_ShipStateAndDamageBehavior == null)
        {
            Debug.LogError("Miss m_ShipStateAndDamageBehavior");
        }
        if (m_ShipDeathBehavior == null)
        {
            Debug.LogError("Miss m_ShipDeathBehavior");
        }
        if (m_ShipKillBehavior == null)
        {
            Debug.LogError("Miss m_ShipKillBehavior");
        }
        if (m_ShipLevelingBehavior == null)
        {
            Debug.LogError("Miss m_ShipLevelingBehavior");
        }
        if (m_ShipTresorBehavior == null)
        {
            Debug.LogError("Miss m_ShipTresorBehavior");
        }
        if (m_ShipMaterialBehavior == null)
        {
            Debug.LogError("Miss m_ShipMaterialBehavior");
        }
        if (m_ShipEquipementBehavior == null)
        {
            Debug.LogError("Miss m_ShipEquipementBehavior");
        }
        if (m_ShipDashBehavior == null)
        {
            Debug.LogError("Miss m_ShipDashBehavior");
        }
        if (m_ShipViewPoint == null)
        {
            Debug.LogError("Miss m_ShipViewPoint");
        }
        if (m_ShipSpurBehavior == null)
        {
            Debug.LogError("Miss m_ShipSpurBehavior");
        }

        //For UI
        if (m_IsGreen)
        {
            UICamera.cullingMask = LayerGreen;
        }
        else
        {
            UICamera.cullingMask = LayerOrange;
        }

        //For System
        m_ShipLevel = 1;
    }