Ejemplo n.º 1
0
    void OnTriggerEnter(Collider other)
    {
//		Debug.Log("test---OnTriggerEnter -> Collider "+other.gameObject.name
//		          +", IsSelectDanJiMode "+GameModeCtrl.IsSelectDanJiMode);
        if (Application.loadedLevel != (int)GameLevel.Movie)
        {
            return;
        }

//		if (GameModeCtrl.IsSelectDanJiMode) {
//			return;
//		}
        if (GameModeCtrl.GameModeState != 0)
        {
            return;
        }

        GameMoShiInfo script = other.GetComponent <GameMoShiInfo>();

        if (script == null)
        {
            return;
        }
//		Debug.Log("OnTriggerEnter -> Collider "+other.gameObject.name);

        switch (script.AppModeVal)
        {
        case GameMode.LianJi:
            if (ZXModeVal != GameMode.LianJi)
            {
                GameMoShiInfo.InstanceLianJi.SetTransformScale(new Vector3(1.1f, 1.1f, 1f));
                GameMoShiInfo.InstanceDanJi.SetTransformScale(new Vector3(1f, 1f, 1f));
                GameModeCtrl.ModeVal = GameMode.LianJi;
                GameModeCtrl.GetInstance().SetActiveStartBt(true);
                XKGlobalData.GetInstance().PlayModeXuanZeAudio();
            }
            break;

        default:
            if (ZXModeVal == GameMode.Null || ZXModeVal == GameMode.LianJi)
            {
                GameMoShiInfo.InstanceLianJi.SetTransformScale(new Vector3(1f, 1f, 1f));
                GameMoShiInfo.InstanceDanJi.SetTransformScale(new Vector3(1.1f, 1.1f, 1f));
                GameModeCtrl.ModeVal = GameMode.DanJiFeiJi;
                GameModeCtrl.GetInstance().SetActiveStartBt(true);
                XKGlobalData.GetInstance().PlayModeXuanZeAudio();
            }
            break;
        }
        ZXModeVal = GameModeCtrl.ModeVal;
    }
Ejemplo n.º 2
0
    void Start()
    {
        ModeSprite = GetComponent <UISprite>();
        switch (AppModeVal)
        {
        case GameMode.LianJi:
            InstanceLianJi = this;
            break;

        default:
            InstanceDanJi = this;
            break;
        }
    }
    void Start()
    {
        GameTextVal = XKGlobalData.GetGameTextMode();
        //GameTextVal = GameTextType.English; //test
        ModeSprite = GetComponent <UISprite>();
        switch (AppModeVal)
        {
        case GameMode.LianJi:
            InstanceLianJi = this;
            break;

        default:
            InstanceDanJi = this;
            break;
        }
        InitGameModeImg();
    }