Beispiel #1
0
    void SetDefaultRot()
    {
        m_CurFrontType = ShipFrontType.FrontType_Gun1;

        //
        m_Guns.transform.eulerAngles = new Vector3(0.0f, 0.0f, 0.0f);
        //

        m_ShipTexObj.transform.eulerAngles = new Vector3(0.0f, 0.0f, 0.0f);

        CloseAllShipTex();

        //m_ShipTexObj_0.gameObject.SetActive (true);
        m_ShipTexObj_0.color = new Color(m_ShipTexObj_0.color.r, m_ShipTexObj_0.color.g, m_ShipTexObj_0.color.b, 1.0f);
        //SpriteRenderer sp = m_ShipTexObj.GetComponent<SpriteRenderer>();
        //sp.sprite = ShipTex_Degree_0;
    }
Beispiel #2
0
    public void RotTrangleOver()
    {
        m_bRotingShip = false;

        int curfronttypeindex = (int)m_CurFrontType;

        m_CurFrontType = (ShipFrontType)(curfronttypeindex + 1);

        if (m_CurFrontType == ShipFrontType.NumFrontType)
        {
            m_CurFrontType = ShipFrontType.FrontType_Gun1;
        }

        CloseAllShipTex();

        EnableAllShield();

        switch (m_CurFrontType)
        {
        case ShipFrontType.FrontType_Gun1:
        {
            m_Gun1.EnableGunSystem();

            //
            m_Guns.transform.eulerAngles = new Vector3(0.0f, 0.0f, 0.0f);
            //
            m_ShipTexObj_0.color = new Color(m_ShipTexObj_0.color.r, m_ShipTexObj_0.color.g, m_ShipTexObj_0.color.b, 1.0f);
            //SpriteRenderer sp = m_ShipTexObj.GetComponent<SpriteRenderer>();
            //sp.sprite = ShipTex_Degree_0;
        }
        break;

        case ShipFrontType.FrontType_Shild1:
        {
            //m_Gun1.EnableGunSystem();
            //m_Gun2.EnableGunSystem();
            //m_Shild1.EnableShieldSystem();
            //
            m_Guns.transform.eulerAngles = new Vector3(0.0f, 0.0f, -60.0f);
            //
            m_ShipTexObj_60.color = new Color(m_ShipTexObj_0.color.r, m_ShipTexObj_0.color.g, m_ShipTexObj_0.color.b, 1.0f);
            //SpriteRenderer sp = m_ShipTexObj.GetComponent<SpriteRenderer>();
            //sp.sprite = ShipTex_Degree_60;
        }
        break;

        case ShipFrontType.FrontType_Gun2:
        {
            m_Gun2.EnableGunSystem();
            //
            m_Guns.transform.eulerAngles = new Vector3(0.0f, 0.0f, -120.0f);
            //
            m_ShipTexObj_120.color = new Color(m_ShipTexObj_0.color.r, m_ShipTexObj_0.color.g, m_ShipTexObj_0.color.b, 1.0f);
            //SpriteRenderer sp = m_ShipTexObj.GetComponent<SpriteRenderer>();
            //sp.sprite = ShipTex_Degree_120;
        }
        break;

        case ShipFrontType.FrontType_Shild2:
        {
            //m_Gun3.EnableGunSystem();
            //m_Gun2.EnableGunSystem();
            //m_Shild2.EnableShieldSystem();
            //
            m_Guns.transform.eulerAngles = new Vector3(0.0f, 0.0f, -180.0f);
            //
            m_ShipTexObj_180.color = new Color(m_ShipTexObj_0.color.r, m_ShipTexObj_0.color.g, m_ShipTexObj_0.color.b, 1.0f);
            //SpriteRenderer sp = m_ShipTexObj.GetComponent<SpriteRenderer>();
            //sp.sprite = ShipTex_Degree_180;
        }
        break;

        case ShipFrontType.FrontType_Gun3:
        {
            m_Gun3.EnableGunSystem();
            //
            m_Guns.transform.eulerAngles = new Vector3(0.0f, 0.0f, -240.0f);
            //
            m_ShipTexObj_240.color = new Color(m_ShipTexObj_0.color.r, m_ShipTexObj_0.color.g, m_ShipTexObj_0.color.b, 1.0f);
            //SpriteRenderer sp = m_ShipTexObj.GetComponent<SpriteRenderer>();
            //sp.sprite = ShipTex_Degree_240;
        }
        break;

        case ShipFrontType.FrontType_Shild3:
        {
            //m_Gun1.EnableGunSystem();
            //m_Gun3.EnableGunSystem();
            //m_Shild3.EnableShieldSystem();
            //
            m_Guns.transform.eulerAngles = new Vector3(0.0f, 0.0f, -300.0f);
            //
            m_ShipTexObj_300.color = new Color(m_ShipTexObj_0.color.r, m_ShipTexObj_0.color.g, m_ShipTexObj_0.color.b, 1.0f);
            //SpriteRenderer sp = m_ShipTexObj.GetComponent<SpriteRenderer>();
            //sp.sprite = ShipTex_Degree_300;
        }
        break;
        }

        //rot 60 dgree
    }