@@ -154,6 +154,9 @@ public class Thing : MonoBehaviour {
ClearAdjList ();
_madeOf = null;
transform.localScale = _startScale;
if (_rigid == null) {
_rigid = GetComponent<Rigidbody>();
}
_rigid.mass = _mass;
}
public void SetAsModifiedScale(){
@@ -277,8 +280,10 @@ public class Thing : MonoBehaviour {
float BounceFactor(Thing _otherThing){
float _otherBounce = 0;
float _thisBounce = 0;
if(_otherThing.MadeFrom.IsBouncy)
if(_otherThing != null){
if(_otherThing.MadeFrom.IsBouncy )
_otherBounce = _otherThing.MadeFrom.BounceAmount;
}
if (_madeOf.IsBouncy)
_thisBounce = _madeOf.BounceAmount;
if (_otherBounce > _thisBounce)
@@ -302,13 +307,13 @@ public class Thing : MonoBehaviour {
if (_madeOf.IsBouncy && _player.Move.StateName != "ground" && _player.Velocity.magnitude > 8) {
_isKinematic = true;
_kinamticTimer = 0;
_player.Rigid.velocity = Vector3.Reflect(_player.Velocity ,_theCollision.contacts[0].normal) *.7f;
_player.Rigid.velocity = Vector3.Reflect(_player.Velocity ,_theCollision.contacts[0].normal)* _madeOf.BounceAmount;
EliminateLandingChaos();
}
}
public void StopMoving(){
if(World.Chaos < 4){
if(!_isKinematic){
if(!_isKinematic && !_rigid.isKinematic){
_rigid.velocity = Vector3.zero;
}
}
@@ -335,7 +340,9 @@ public class Thing : MonoBehaviour {
_z = _rigid.velocity.z;
_posZ = transform.position.z;
}
_rigid.velocity = new Vector3(_x,_rigid.velocity.y,_z);
if(!_rigid.isKinematic){
_rigid.velocity = new Vector3(_x,_rigid.velocity.y,_z);
}
transform.position = new Vector3(_posX, transform.position.y,_posZ);
}
}
@@ -447,6 +454,15 @@ void SortAdjectives(){ //this puts them in the order that the designer wants to

#region Start and Update
void Start(){
if(_rigid == null){
_rigid = GetComponent<Rigidbody> ();
}
if(_meshes == null){
_meshes = GetComponentsInChildren<Renderer> ();
}
if(_renderer == null){
_renderer = GetComponent<MeshRenderer> ();
}
_position = transform.position;
_rotation = transform.rotation;

@@ -47,7 +47,13 @@ public class World : MonoBehaviour {
Adjective[] _theAdjs = FindObjectsOfType<Adjective> ();
foreach (Adjective _adj in _theAdjs) {
if(_adj.transform.parent != _adjParent.transform){ //If they are not a child of the _adjParent, they are not a base adjective
Adjective _originalAdj = _baseAdjs[_adj.adjName];
Adjective _originalAdj = null;
if(!_baseAdjs.ContainsKey(_adj.adjName)){
Debug.Log("you spelled " + _adj.adjName + " on object " + _adj.name + " incorrectly, fix it batch.");
}
else{
_originalAdj = _baseAdjs[_adj.adjName];
}
if(_originalAdj == null){
Debug.Log ("You have an adjective name does not match a base adjective on the object " + _adj.gameObject.name);
}
@@ -68,20 +74,13 @@ public class World : MonoBehaviour {
}
}

void ThingStartGame(){
void ThingStartGame(){ //Also used in buttons. Tell every thing to do their start up routine
Thing[] _allThings = FindObjectsOfType<Thing>();
foreach (Thing _thing in _allThings){
_thing.StartGame();
}
}
void AdjectivesInGameStart(){
_theAdjectives = GetComponentsInChildren<Adjective> ();
Adjective[] _allAdjectives = FindObjectsOfType (typeof(Adjective)) as Adjective[];
foreach (Adjective _adj in _allAdjectives) {
_adj.GameStart();
}
}
static void MadeOfGameStart(){
static void MadeOfGameStart(){ //gets the made of properties
_allMadeOfs = World.T.GetComponentsInChildren<MadeOf> ();
}

@@ -99,6 +98,7 @@ public class World : MonoBehaviour {
public static void SwapAdj(){
Adjective.SwapAdjectives (PlayerCon.SelectedThing, WorldUI.TopPanel.AdjI, WorldUI.InvenAdj.AdjI);
WorldUI.RefreshThingUI ();
PlayerCon.IsGroundSlick (); //Do a ground test.
}
public static void PauseTime(){
Time.timeScale = 0;
Binary file not shown.
@@ -23,7 +23,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = Assembly-CSharp.csproj
Policies = $0
$0.TextStylePolicy = $1
@@ -23,7 +23,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = Assembly-CSharp.csproj
Policies = $0
$0.TextStylePolicy = $1
@@ -1,17 +1,18 @@
<Properties>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" PreferredExecutionTarget="MonoDevelop.Default" />
<MonoDevelop.Ide.Workbench ActiveDocument="Assets\Code\Things\Thing.cs">
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.Workbench ActiveDocument="Assets\Code\World.cs">
<Files>
<File FileName="Assets\Code\Player\Mo_Ground.cs" Line="48" Column="15" />
<File FileName="Assets\Code\Player\Mo_Ground.cs" Line="82" Column="97" />
<File FileName="Assets\Code\Player\PlayerController.cs" Line="21" Column="53" />
<File FileName="k:\FX_TDT\GameProjects\Projects\TrueNamer\TrueNamer\Unity\Assets\Code\Player\Mo_Pulling.cs" Line="1" Column="1" />
<File FileName="k:\FX_TDT\GameProjects\Projects\TrueNamer\TrueNamer\Unity\Assets\Code\Player\Motion.cs" Line="1" Column="1" />
<File FileName="Assets\Editor\EditWorld.cs" Line="1" Column="1" />
<File FileName="Assets\ShroudPlugin\Readme.txt" Line="1" Column="1" />
<File FileName="Assets\Editor\EditWorld.cs" Line="6" Column="1" />
<File FileName="Assets\Code\Player\Mo_InAir.cs" Line="1" Column="1" />
<File FileName="Assets\Code\Things\Thing.cs" Line="157" Column="28" />
<File FileName="Assets\Code\Things\Adjective.cs" Line="11" Column="1" />
<File FileName="Assets\Code\World.cs" Line="78" Column="2" />
<File FileName="Assets\Code\Things\Thing.cs" Line="92" Column="2" />
<File FileName="Assets\Code\Things\Adjective.cs" Line="58" Column="25" />
<File FileName="Assets\Code\World.cs" Line="53" Column="6" />
<File FileName="Assets\Editor\EditThing.cs" Line="20" Column="38" />
<File FileName="Assets\Code\Things\MadeOf.cs" Line="38" Column="50" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>