Beispiel #1
0
		public Job (List<string> RequiredTasks, Thing TargetThing)
		{
			tasks = RequiredTasks;
			//targetThing = TargetThing;
			//targetThing.assignedJob = this;
			//targetThing.Exposer.AddPersistent (this);
		}
Beispiel #2
0
		public static void AddJob (Thing TargetThing, List<string> tasks)
		{
			/*
			if (TargetThing.assignedJob == null) {
				if (TargetThing.workRequired > 0) {
					jobQueList.Add (new Job (tasks, TargetThing));
				}
			}
			*/
		}
		public PhysicsObject (Thing target, Vector3 Dimensions, float Mass =100f)
		{
			ClearForces ();
			thing = target;
			deltaPos = new Vector3 (0, 0, 0);
			velocity = new Vector3 (0, 0, 0);
			angularVelocity = new Vector3 (0, 0, 0);
			centerOfMass = new Vector3 (0, 0, 0);
			localDrag = 0;
			dragCoeff = 1;
			mass = Mass;
			dimensions = Dimensions;
			CalculateCenterOfMass ();
			CalculateMomentOfInertia ();
			PhysicsManager.Add (this);
		}
Beispiel #4
0
		public void CreateNew (Thing parent)
		{/*
			Type myType = Type.GetType ("Eniso." + type);
			if (myType != null) {
				Thing newDrop = (Thing)Activator.CreateInstance (myType);
				if (newDrop != null) {
					newDrop.Init ("Thing_Prop_" + id);
					newDrop.Position = parent.Position;
					try {
						((Resource)newDrop).Add (qty);
					} catch (InvalidCastException) { 
					}
				} else {
					Debug.Log ("Drop of type " + type + " could not be created");
				}
			} else {
				Debug.Log ("Type value is null for drop of id " + id + " could not create");
			}
			*/
		}
		public void Destroy ()
		{
			PhysicsManager.Remove (this);
			thing = null;
		}
		public void Destroy ()
		{
			thing = null;
			colony.RemoveConstructionJob (this);
			colony = null;
		}
		public ConstructionJob (Colony tColony, Thing tThing)
		{
			thing = tThing;
			colony = tColony;
			constructionPoints = thing.constructionPointsRequired;
		}