Skip to content

Commit

Permalink
Hot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
H-POPS authored Jul 9, 2017
1 parent e0fa852 commit 4b893a4
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 14 deletions.
3 changes: 0 additions & 3 deletions Depender/Events/ChangePendulum.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ public class ChangePendulum : RideAnimationEvent
{

public PendulumRotatorHP rotator;
float lastTime;
public float Friction = 20f;
public bool Pendulum;
private float startPendulumPosition;
private float windUpAngleTarget = 100f;
public override void Check(CustomFlatRide RA)
{
foreach (PendulumRotatorHP R in RA.motors.OfType<PendulumRotatorHP>().ToList())
Expand Down
2 changes: 1 addition & 1 deletion Depender/HPMotors/MoverHP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private enum State

public override void GetAxis(GameObject GO)
{
axis = GO.transform.FindChild(axisPath);
axis = GO.transform.Find(axisPath);
base.GetAxis(GO);
}
public override void Reset()
Expand Down
4 changes: 2 additions & 2 deletions Depender/HPMotors/MultipleRotationsHP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ public override void Reset()
}
public override void GetAxis(GameObject GO)
{
mainAxis = GO.transform.FindChild(axisPath);
mainAxis = GO.transform.Find(axisPath);
foreach (string path in AxissPath)
{
Axiss.Add(GO.transform.FindChild(path));
Axiss.Add(GO.transform.Find(path));
}
base.GetAxis(GO);
}
Expand Down
2 changes: 1 addition & 1 deletion Depender/HPMotors/RotateBetweenHP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public override string EventName
}
public override void GetAxis(GameObject GO)
{
axis = GO.transform.FindChild(axisPath);
axis = GO.transform.Find(axisPath);
base.GetAxis(GO);
}
public override void Reset()
Expand Down
2 changes: 1 addition & 1 deletion Depender/HPMotors/RotatorHP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public Transform axis
}
public override void GetAxis(GameObject GO)
{
axis = GO.transform.FindChild(axisPath);
axis = GO.transform.Find(axisPath);
base.GetAxis(GO);
}
public override void Enter()
Expand Down
4 changes: 2 additions & 2 deletions Depender/Objects/CoasterCarMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ public override void Decorate()
CarType.minTrainLength = 1;
CarType.maxTrainLength = 10;
AssetManager.Instance.registerObject(Object.AddComponent<Car>());
CarType.carGO = Object;
CarType.vehicleGO = Object.GetComponent<Car>();
if (FrontCarGO != null)
{
AssetManager.Instance.registerObject(FrontCarGO.AddComponent<Car>());
CarType.frontCarGO = FrontCarGO;
CarType.frontVehicleGO = FrontCarGO.GetComponent<Car>();
}
CarType.displayName = Name;
CarType.name = Name;
Expand Down
6 changes: 2 additions & 4 deletions Depender/Objects/Shops/ShopMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ public enum hand { Left, Right }
public hand Hand = hand.Left;
[SerializeField]
public List<ingredient> ingredients = new List<ingredient>();
private ingredient selected;
private Vector2 scrollPos;
public virtual GameObject Decorate()
{

Expand All @@ -68,7 +66,7 @@ public virtual GameObject Decorate()
var resource = ScriptableObject.CreateInstance<Resource>();
resource.name = I.Name;
resource.setDisplayName(I.Name);
resource.costs = I.price;
resource.setCosts(I.price);
resource.getResourceSettings().percentage = 1f;
List<ConsumableEffect> consumableEffects = new List<ConsumableEffect>();
foreach (effect E in I.effects)
Expand Down Expand Up @@ -159,7 +157,7 @@ public override GameObject Decorate()
{
ConsumableProduct CP = GO.AddComponent<ConsumableProductInstance>();

CP.trash = AssetManager.Instance.getPrefab(Prefabs.CandyTrash).gameObject;
CP.trash = AssetManager.Instance.getPrefab(Prefabs.CandyTrash).GetComponent<Trash>();

BindingFlags flags = BindingFlags.GetField | BindingFlags.Instance | BindingFlags.NonPublic;
typeof(Product).GetField("displayName", flags).SetValue(CP, Name);
Expand Down

0 comments on commit 4b893a4

Please sign in to comment.