Example #1
0
	static public void RestoreParts(ActorBase actor) {
		if (dicActorParts.Count == 0)
			return;

		if (actor == null) {
			ActorBase[] objs = GameObject.FindObjectsOfType(typeof(ActorBase)) as ActorBase[];
			foreach (ActorBase obj in objs) {
				RestoreParts(obj);
			}
		} else if (dicActorParts.ContainsKey(actor.name)) {
			foreach (Transform form in dicActorParts[actor.name].parts) {
				actor.ChangeInto(form, 0);
			}
		}
	}