public void rez_init_player (RichChar per, int stepID) { try { if (per == null) throw new System.ArgumentNullException ("per"); //RichChar per = a as RichChar; if (GameObject.Find (per.playername) == null) { //if (per.stand_at_prop_id == 0) // throw new UnityException ("the object current step is not set! please refer to the character setup on :" + per.playername); //Property loc = getPropertyById (per.stand_at_prop_id); ///if (loc == null) /// throw new UnityException ("cannot find the location by the property ID please go check it. Maybe this can help: set each player's stand_at_prop_id at 1."); //Vector3 pos = loc.getStepLocation (); if (per.prefab == null) throw new UnityException ("the object prefab is not set! please refer to the character setup on :" + per.playername); //per.currentstep = proertyIDtoIndex (per.stand_at_prop_id); GameObject MACHINE = (GameObject)Instantiate (per.prefab) as GameObject; MACHINE.name = per.playername; CharacterControllerLogic control = MACHINE.GetComponentInChildren<CharacterControllerLogic> () as CharacterControllerLogic; control.FansCam = Camera.main.gameObject.GetComponent<FantasticCamera> () as FantasticCamera; //per.position = pos; //fcharacter_now.transform.position = pos; per.character_stage = MACHINE; per.setGroundMask (groundonlymask); } } catch (UnityException e) { Debug.LogError (e.ToString ()); } }
public void rez_init_player (RichChar per) { try { if (per == null) throw new System.ArgumentNullException ("per"); //RichChar per = a as RichChar; if (GameObject.Find (per.playername) == null) { if (per.stand_at_prop_id == 0) throw new UnityException ("the object current step is not set! please refer to the character setup on :" + per.playername); Property loc = getPropertyById (per.stand_at_prop_id); if (loc == null) throw new UnityException ("cannot find the location by the property ID please go check it. Maybe this can help: set each player's stand_at_prop_id at 1."); Vector3 pos = loc.getStepLocation (); if (per.prefab == null) throw new UnityException ("the object prefab is not set! please refer to the character setup on :" + per.playername); per.currentstep = proertyIDtoIndex (per.stand_at_prop_id); GameObject fcharacter_now = (GameObject)Instantiate (per.prefab) as GameObject; fcharacter_now.name = per.playername; per.position = pos; fcharacter_now.transform.position = pos; per.character_stage = fcharacter_now; per.setGroundMask (ground_only_mask); } } catch (UnityException e) { Debug.LogError (e.ToString ()); } }
public void initAll (RichChar camfocus) { foreach (GameObject snapob in GameObject.FindGameObjectsWithTag("Player")) { //snapob.SetActive (true); RichmanAnimator h = snapob.GetComponent<RichmanAnimator> (); h.enabled = true; h.stop_scope_allowance = _nodeStationAllowDistance; h.init (GetComponent<SplineCity> ().getSplineLoaded ()); } //focus to this player CharacterControllerLogic u = camfocus.character_stage.GetComponentInChildren<CharacterControllerLogic> () as CharacterControllerLogic; u.triggerFocusMain (); }
//called from the componenet // public void OnFinishedWaitingPanel () // { // control_panel.SetActive (true); // waiting_panel.SetActive (false); // control_panel_alpha.PlayReverse (); // play_dice = false; // } public void StartPanelWithPlayerControl (RichChar plr) { try { if (plr == null) throw new UnityException ("null pointer for RichChar plr"); control_panel.SetActive (true); waiting_panel.SetActive (false); nametag.text = plr.playername; money.text = plr.moneyinhand.ToString (); panel_transition = DIR.BACKWARD; control_panel_alpha.PlayReverse (); } catch (UnityException e) { Debug.LogError (e.ToString ()); } }
public void withPlayer (RichChar user) { user.landing = cache_current_property; user.stepdata = this; if (owner == -1) { buildingtitle = relation.UNCLAIMED; } else if (owner == -2) { buildingtitle = relation.FUNCTIONAL_LAND; } else { if (owner == user.owner_id) buildingtitle = relation.MY_PROPERTY; if (owner != user.owner_id) { buildingtitle = relation.OWNED_BY_OTHER; } } }
protected override void NewCameraFocusObject (RichChar t) { //base.NewCameraFocusObject (t); CharacterControllerLogic control = t.character_stage.GetComponentInChildren<CharacterControllerLogic> () as CharacterControllerLogic; fantcam.triggerFocusMain (control, control.gameObject.transform); }
public UIPropertyList setPerson (RichChar person) { inspecting_person = person; return this; }
public void RenderPropertyList (RichChar person) { //inspecting_person = person; //StartCoroutine (clearList ()); List<Property> landList = gameEngine.Instance.spline_city.getPropertyListByOwner (person) as List<Property>; int i = 0; //Debug.Log (person.bankmoney); if (landList != null) { if (!blockAdding) { foreach (Property place in landList) { Debug.Log (place.owned_by_id + ", id"); appendItemToUIGrid (i, place); i++; } } componentGrid.Reposition (); //componentGrid. } else { Debug.Log ("land not found."); } //NGUITools.Destroy( }
public IEnumerable<Property> getPropertyListByOwner (RichChar person) { return bigList.Where (building => building.owned_by_id == person.owner_id); }
//private RichChar search_player; public List<Property> getPropertyListByOwner (RichChar w) { //Debug.Log (w.owner_id); return bigList.FindAll (x => x.owned_by_id == w.owner_id); }
public BankDialogDescriptor (RichChar person) { client = person; type = panel_helper_dialog.talk_type.BANK_SERVICE; }
public void setMoneyLogicFlow (DialogDescriptor descriptor, RichChar about_him, Action exit) { activate_forward (); this.setActiveGirl (2); focus_player = about_him; mComplete = exit; descriptor.setPanelLookFeel (DIALOG, "Highlight2", dialog_colors [3]); talk = descriptor.type; this.DDescr = descriptor; playforward (); }
public PlayerData setPlayerStatus (RichChar.status e) { this.player_status = e; return this; }