コード例 #1
0
    public void spawnNormalPingMap(Vector3 mapPosition, Vector3 screenPosition)
    {
        GameObject      pingMapGO = (Instantiate(m_pingMap) as GameObject);
        PingMapBehavior pingMap   = pingMapGO.GetComponent <PingMapBehavior>();

        pingMap.gameObject.transform.position = mapPosition;
        pingMap.m_pingEffect.Play();
        Destroy(pingMapGO, 2.45f);

        GameObject pingCanvasGO = Instantiate(m_pingCanvas) as GameObject;

        pingCanvasGO.transform.SetParent(m_playerCanvas.transform);
        PingCanvasBehavior pingCanvas = pingCanvasGO.GetComponent <PingCanvasBehavior>();

        pingCanvas.SetPingIcon(m_normalPingSprite, screenPosition);
        Destroy(pingCanvasGO, 2.45f);

        playPingSpawnSound(m_pingNormalSound);
    }
コード例 #2
0
    public void spawnPingMap(Vector3 mapPosition, Vector3 screenPosition)
    {
        GameObject      pingMapGO = (Instantiate(m_pingMap) as GameObject);
        PingMapBehavior pingMap   = pingMapGO.GetComponent <PingMapBehavior>();

        pingMap.gameObject.transform.position = mapPosition;
        pingMap.SetPingEffectColor(m_pingMenu.m_index);
        pingMap.m_pingEffect.Play();
        Destroy(pingMapGO, 2.45f);

        GameObject pingCanvasGO = Instantiate(m_pingCanvas) as GameObject;

        pingCanvasGO.transform.SetParent(m_playerCanvas.transform);
        PingCanvasBehavior pingCanvas = pingCanvasGO.GetComponent <PingCanvasBehavior>();

        pingCanvas.SetPingIcon(m_pingMenu.getSelectedIcon(), screenPosition);
        Destroy(pingCanvasGO, 2.45f);

        playPingSpawnSound(m_pingElementsSounds[m_pingMenu.m_index]);
    }