예제 #1
0
 public void changeIncreaseLevel(int aLevel, Action aCallback)
 {
     MySoundPlayer.playSe("increase", false);
     mIncreaseLevel = aLevel;
     updateValueDisplay();
     mBuildingRenderer.sprite = Resources.Load <Sprite>("sprites/feild/mass/building" + aLevel.ToString());
     mBuilding.scale2D        = new Vector2(0, 0);
     mBuilding.scaleTo(new Vector2(0.2f, 1.3f), 0.2f, () => {
         mBuilding.scaleTo(new Vector2(1.3f, 0.6f), 0.2f, () => {
             mBuilding.scaleTo(new Vector2(1, 1), 0.2f, () => {
                 aCallback();
             });
         });
     });
 }
예제 #2
0
    public void open(int aNum)
    {
        if (mIsOpen)
        {
            return;
        }
        mIsOpen = true;
        mBox.scaleTo(new Vector2(0, 0), 0.3f);
        mNumber.scaleTo(new Vector2(3, 3), 0.3f);
        mNumMesh.text = aNum.ToString();

        //sound
        MySoundPlayer.playSe("open", false);

        //light
        for (int i = 0; i < 5; i++)
        {
            throwLight();
        }
    }
예제 #3
0
    private void Start()
    {
        Arg tArg = MySceneManager.getArg("eventBox");

        mText.text      = tArg.get <string>("text");
        mWindow.scale2D = new Vector2(0, 0);

        mBox.moveTo(new Vector3(0, 1, 0), 0.4f, () => {
            MyBehaviour.setTimeoutToIns(0.2f, () => {
                MySoundPlayer.playSe("open", false);
                mEventBox.scaleTo(new Vector2(0, 0), 0.3f);
                mWindow.scaleTo(new Vector2(1, 1), 0.4f);
                for (int i = 0; i < 5; i++)
                {
                    throwLight(mBox.worldPosition);
                }
                MyBehaviour.setTimeoutToIns(1.5f, () => {
                    MySceneManager.closeScene("eventBox");
                });
            });
        });
    }