public void Start() { if (this.isLocalPlayer) { Instance_ = this; } }
private StateBase whoIsGod() { State state = TaskState.Create(delegate { if (_hasAnchor) { Root.Instance.view.board.state = InfoBoard.State.Hide; } else { Root.Instance.view.board.state = InfoBoard.State.Scan; } Task task = new Task(); TaskManager.AddAndIsOver(task, delegate { return(Root.Instance.model.hasGod); }); return(task); }, this.fsm_, "running"); state.addAction(Ctrl.AnchorEvent, delegate { WhoIsGod wid = Altar.LocalComponent <WhoIsGod>(); wid.IAmGod(); }); state.onStart += delegate { _stateName = "whoIsGod"; Debug.Log("state:" + _stateName); }; return(state); }
private void synchro() { BroadcastingStation bs = Altar.LocalComponent <BroadcastingStation>(); if (bs) { bs.broadcasting(this); } }
public bool isItMe() { if (Model.Instance.hasGod) { Hero hero = Altar.LocalComponent <Hero>(); return(Model.Instance.godId == hero.data.id); } return(true); }
public void setValue(int value) { value_ = value; BroadcastingStation bs = Altar.LocalComponent <BroadcastingStation>(); if (bs) { bs.broadcasting(this); } }
private StateBase alone() { State state = TaskState.Create(delegate { WhoIsGod wid = null; Task task = new Task(); TaskManager.AddAndIsOver(task, delegate { wid = Altar.LocalComponent <WhoIsGod>(); return(wid != null); }); TaskManager.PushBack(task, delegate { wid.IAmGod(); }); return(task); }, this.fsm_, "running"); return(state); }