Example #1
0
 public void setGuangBoListener(GuangBoListener listener)
 {
     this.listener = listener;
 }
Example #2
0
 // Use this for initialization
 void Start()
 {
     guangBoListener = FindObjectOfType <GuangBoListener>();
     animator        = GetComponent <Animator>();
 }
Example #3
0
    // Use this for initialization
    void Start()
    {
        roomContraller       = FindObjectOfType <RoomContraller>();
        eventController      = FindObjectOfType <EventController>();
        this.guangBoListener = FindObjectOfType <GuangBoListener>();
        player = FindObjectOfType <Player>();
        nolan  = FindObjectOfType <Nolan>();
        ben    = FindObjectOfType <Ben>();
        kate   = FindObjectOfType <Kate>();
        martin = FindObjectOfType <Martin>();
        jessie = FindObjectOfType <Jessie>();
        if (newOrLoad)
        {
            //目前是写死。。后面需要改为程序控制添加 游戏人数

            setEndRound(player);
            setEndRound(nolan);
            setEndRound(ben);
            setEndRound(jessie);
            setEndRound(kate);
            setEndRound(martin);
            roundCount = 1;
            player.setActionPointrolled(true);
        }
        else
        {
            Debug.Log("laod  this game round begin ");
            string   datapath = Application.persistentDataPath + "/Save/SaveData0.sav";
            SaveData data     = (SaveData)IOHelper.GetData(datapath, typeof(SaveData));
            // foreach (string name in data.CharaNames)
            // player.setActionPointrolled(data.P6.ActionPointrolled);
            setEndRound(player);
            setEndRound(nolan);
            Debug.Log("nolan is dead? " + nolan.isDead());
            setEndRound(ben);
            setEndRound(jessie);
            setEndRound(kate);
            setEndRound(martin);
            roundCount = data.RoundCount;
            Debug.Log("laod  this game round end ");
        }
        // Debug.Log(playChara.getName() + " round this game");
        if (player.isPlayer())
        {
            this.playerChara = player;
        }
        else if (nolan.isPlayer())
        {
            this.playerChara = nolan;
        }
        else if (ben.isPlayer())
        {
            this.playerChara = ben;
        }
        else if (kate.isPlayer())
        {
            this.playerChara = kate;
        }
        else if (martin.isPlayer())
        {
            this.playerChara = martin;
        }
        else if (jessie.isPlayer())
        {
            this.playerChara = jessie;
        }

        isRoundEnd = false;
        playChara  = this.getNextCharecter();
        Debug.Log(playChara.getName() + " begin load  round this game");
    }