public void Goto(string plotName) { APlot plot = TerrainLogic.Find(plotName); ActionLogic.SetOccupied(location [0], location [1], false); RenewLocation(plot.indx, plot.indz); mission = new AMission("移动至" + " " + location [0].ToString() + "," + location [1].ToString(), 0); ActionLogic.SetOccupied(location [0], location [1], true); flesh.SendMessage("CharacterGoto", location); }
public void OntoStage(Vector2 position) { Object.Destroy(entity); entity = Object.Instantiate(ResourceReader.Plants[type]); entity.name = "Pla" + id.ToString(); entity.transform.position = TerrainLogic.Project(position); entity.transform.Rotate(new Vector3(0, id % 6 * 60, 0)); float rate = (float)day / (float)PlantLibrary.MatureDay[type]; entity.transform.localScale = rate >= 1 ? new Vector3(1, 1, 1) : new Vector3(rate, rate, rate); }
public void OntoStage(Vector2 position) { Object.Destroy(flesh); if (gender) { flesh = Object.Instantiate(ResourceReader.Boy); } else { flesh = Object.Instantiate(ResourceReader.Girl); } flesh.name = "Chr" + id.ToString(); flesh.transform.position = TerrainLogic.Project(position); }
public void OntoStage() { GameObject.Destroy(flesh); if (gender) { flesh = GameObject.Instantiate(ResourceReader.Man); } else { flesh = GameObject.Instantiate(ResourceReader.Wom); } RenewLocation(63 + id, 64); flesh.name = "Chr" + id.ToString(); flesh.transform.position = TerrainLogic.GetPosition(location[0], location[1]); flesh.AddComponent <SphereCollider> ().center = new Vector3(0, 0.8f, 0); flesh.GetComponent <SphereCollider> ().radius = 0.8f; flesh.AddComponent <CharacterBehavior> (); }