示例#1
0
    public static void Bubbles(Vector3 pos)
    {
        GameObject        go     = (GameObject)Instantiate(xa.ef.bubblesPrefab, pos, new Quaternion(0, 0, 0, 0));
        DestroyAfterTimer script = go.AddComponent <DestroyAfterTimer>();

        script.timeInSeconds = 2f;
    }
示例#2
0
    public static void CircleBlip(Vector3 pos, float totalTime, float scaleTo, float startingScale)    //Creates a expanding & fading disk. Lasts 0.3 seconds before scaing out
    {
        GameObject go = (GameObject)Instantiate(xa.ef.circleBlipPrefab, pos, new Quaternion(0, 0, 0, 0));

        go.transform.SetScaleX(startingScale);
        go.transform.SetScaleZ(startingScale);
        iTween.ScaleTo(go, iTween.Hash("x", scaleTo, "z", scaleTo, "islocal", true, "easetype", iTween.EaseType.easeInOutSine, "time", totalTime));
        iTween.FadeTo(go, iTween.Hash("alpha", 0, "easetype", iTween.EaseType.easeInOutSine, "time", totalTime));

        DestroyAfterTimer script = go.AddComponent <DestroyAfterTimer>();

        script.timeInSeconds = totalTime + 0.1f;
    }