コード例 #1
0
ファイル: Blueprint.cs プロジェクト: mokun/martian-agora
 public void StartBlueprint(Thing thing)
 {
     if (blueprintStructure != null)
     {
         Destroy(blueprintStructure);
     }
     blueprintMode      = BlueprintModes.expanding;
     expandTimer        = 0;
     this.thing         = thing;
     blueprintStructure = StructureFactory.MakeStructure(thing.thingType, true);
     blueprintStructure.transform.parent = gameObject.transform;
 }
コード例 #2
0
ファイル: Blueprint.cs プロジェクト: mokun/martian-agora
 public void MakeIfConstructed()
 {
     //this turns the blueprint into a real structure. removes nodes, deletes itself, and activates structure.
     if (IsConstructed())
     {
         GameObject          realStructure       = StructureFactory.MakeStructure(thing.thingType, false);
         StructureController structureController = realStructure.GetComponent <StructureController> ();
         realStructure.transform.position = blueprintStructure.transform.position;
         realStructure.transform.rotation = blueprintStructure.transform.rotation;
         Destroy(gameObject);
     }
 }