Commit 276fa256 authored by 16도재형's avatar 16도재형

CivGameManager WIP

parent 9d0ae61d
fileFormatVersion: 2 fileFormatVersion: 2
guid: 2c30431a1f1679f48abcfca63d03dc14 guid: 14316eefeff7b8c4882dee9cb31df5f1
timeCreated: 1516610093 timeCreated: 1518204165
licenseType: Free licenseType: Free
MonoImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:
fileFormatVersion: 2 fileFormatVersion: 2
guid: 1b9aa6e20622168439f93d177f66126d guid: 51a4ccfc53e3bd3489fedcd4adb9e458
timeCreated: 1516875573 timeCreated: 1518204165
licenseType: Free licenseType: Free
MonoImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2 fileFormatVersion: 2
guid: bdf0fa739872652438abde0f4b5f6f2a guid: 2413c1b1e7b93b84a957f43c0249b262
timeCreated: 1516875551 timeCreated: 1518204162
licenseType: Free licenseType: Free
MonoImporter: TextScriptImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:
fileFormatVersion: 2
guid: f6fc0c038e7ce6640910e93606bc6076
timeCreated: 1518204165
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: c10ada295d908db498d79b64d9cff2c3
timeCreated: 1518204162
licenseType: Free
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1839775916168536}
m_IsPrefabParent: 1
--- !u!1 &1839775916168536
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4443529018794624}
- component: {fileID: 33096381128257470}
- component: {fileID: 23665916450649864}
m_Layer: 0
m_Name: hextile
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4443529018794624
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1839775916168536}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &23665916450649864
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1839775916168536}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 93b23d960c7fd2645bed567627e2e6db, type: 3}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &33096381128257470
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1839775916168536}
m_Mesh: {fileID: 4300000, guid: 93b23d960c7fd2645bed567627e2e6db, type: 3}
fileFormatVersion: 2
guid: 900341537233caf489d432cff5440dd3
timeCreated: 1518211537
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 9dd83cb44cef097419ada0fc7975a3a6
folderAsset: yes
timeCreated: 1518210032
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib hextile.mtl
o Cylinder
v 0.000000 -0.050000 -1.000000
v 0.000000 0.050000 -1.000000
v 0.866025 -0.050000 -0.500000
v 0.866025 0.050000 -0.500000
v 0.866025 -0.050000 0.500000
v 0.866025 0.050000 0.500000
v -0.000000 -0.050000 1.000000
v -0.000000 0.050000 1.000000
v -0.866025 -0.050000 0.500000
v -0.866025 0.050000 0.500000
v -0.866025 -0.050000 -0.500000
v -0.866025 0.050000 -0.500000
vn 0.5000 0.0000 -0.8660
vn 1.0000 0.0000 0.0000
vn 0.5000 0.0000 0.8660
vn -0.5000 0.0000 0.8660
vn 0.0000 1.0000 -0.0000
vn -1.0000 0.0000 0.0000
vn -0.5000 0.0000 -0.8660
vn 0.0000 -1.0000 0.0000
usemtl None
s off
f 1//1 2//1 4//1 3//1
f 3//2 4//2 6//2 5//2
f 5//3 6//3 8//3 7//3
f 7//4 8//4 10//4 9//4
f 4//5 2//5 12//5 10//5 8//5 6//5
f 9//6 10//6 12//6 11//6
f 11//7 12//7 2//7 1//7
f 1//8 3//8 5//8 7//8 9//8 11//8
fileFormatVersion: 2
guid: 93b23d960c7fd2645bed567627e2e6db
timeCreated: 1518210045
licenseType: Free
ModelImporter:
serializedVersion: 22
fileIDToRecycleName:
100000: default
100002: //RootNode
400000: default
400002: //RootNode
2100000: defaultMat
2300000: default
3300000: default
4300000: default
externalObjects: {}
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
preserveHierarchy: 0
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1}
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 0
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using CivModel;
using CivModel.Common;
public class CIVGameManager : MonoBehaviour {
public float outerRadius;
public float innerRadius;
public int width = 80;
public int height = 20;
public GameObject cellPrefab;
private GameObject[,] _cells;
// Use this for initialization
void Start() {
innerRadius = outerRadius * Mathf.Sqrt(3.0f) / 2;
}
// Update is called once per frame
void Update() {
}
void DrawMap() // Draw hexagonal tile map
{
for (int i = 0; i < width; i++)
{
for (int j = 0; j < height; j++)
{
Vector3 pos = new Vector3(2 * i * innerRadius, -j * outerRadius * 1.5f);
if (j % 2 != 0)
{
pos.x -= innerRadius;
}
_cells[i, j] = Instantiate(cellPrefab, pos, Quaternion.identity);
_cells[i, j].name = "(" + i + "," + j + ")";
}
}
}
}
fileFormatVersion: 2 fileFormatVersion: 2
guid: 3ce71f86ddf9be04dac73d95cd355f41 guid: 112f8b62e41ed9842a4ad52cdb5b87df
timeCreated: 1516875535 timeCreated: 1518204182
licenseType: Free licenseType: Free
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using CivPresenter;
using CivModel;
using CivModel.Common;
public class ManagementUIController : MonoBehaviour {
private static ManagementUIController managementUIController;
public Canvas managementUI;
public Button managementTab;
private LinkedList<Production> mProduction;
private LinkedList<Production> mDeployment;
private IReadOnlyList<IProductionFactory> facList;
//private IReadOnlyList<Player> mPlayers;
private GameObject gameManagerObject;
private CIVGameManager gameManager;
private Presenter mPresenter;
private Game mGame;
public List<GameObject> PQlist;
public List<GameObject> DQlist;
public List<GameObject> SQlist;
public GameObject proPrefab;
public GameObject depPrefab;
public GameObject productablePrefab; // prefab templates
public GameObject proQueue;
public GameObject depQueue;
public GameObject productableQueue;
public void SetManagementUI(bool val)
{
Debug.Log("manUI : " + val);
managementUI.enabled = val;
}
public void ManageButton() // Management tab on/off button
{
if (mPresenter.State == Presenter.States.Normal)
{
mPresenter.CommandProductUI();
if(mPresenter.State == Presenter.States.ProductUI)
{
List<GameObject> tempList = new List<GameObject>();
Debug.Log("SelectList startMaking");
mPresenter.CommandApply();
foreach(GameObject sq in SQlist)
{
Destroy(sq);
}
SQlist.Clear();
facList = mPresenter.AvailableProduction;
Debug.Log(mPresenter.AvailableProduction + " " + mPresenter.AvailableProduction.Count);
Debug.Log("facList : " + facList.Count);
Debug.Log("SelectList Updated");
foreach (IProductionFactory fac in facList)
{
var SPrefab = Instantiate(productablePrefab, new Vector3(0f, 0f, 0f), Quaternion.identity);
SPrefab.transform.SetParent(productableQueue.transform);
SPrefab.transform.localScale = new Vector3(1f, 1f, 1f);
SPrefab.transform.localPosition = new Vector3(0f, 0f, 0f);
tempList.Add(SPrefab.GetComponent<SelPrefab>().MakeItem(fac));
}
if(facList.Count == 0)
{
Debug.Log("SelectList null");
var SPrefab = Instantiate(productablePrefab, new Vector3(0f, 0f, 0f), Quaternion.identity);
SPrefab.transform.SetParent(productableQueue.transform);
SPrefab.transform.localScale = new Vector3(1f, 1f, 1f);
SPrefab.transform.localPosition = new Vector3(0f, 0f, 0f);
SPrefab.GetComponent<SelPrefab>().MakeItem();
tempList.Add(SPrefab);
}
SQlist = tempList;
mPresenter.CommandCancel();
MakeProductionQ();
MakeDeploymentQ();
foreach(GameObject sq in SQlist)
{
sq.GetComponent<SelPrefab>().SetButton(SQlist.IndexOf(sq));
}
foreach (GameObject dq in DQlist)
{
dq.GetComponent<DepPrefab>().SetButton(DQlist.IndexOf(dq));
}
}
}
else if (mPresenter.State == Presenter.States.ProductUI)
{
mPresenter.CommandCancel();
}
}
void Awake()
{
DontDestroyOnLoad(this);
if (managementUIController == null)
{
managementUIController = this;
}
else
{
Destroy(this);
}
}
void Start()
{
if (managementUIController == this)
{
gameManagerObject = CIVGameManager.GetGameManager();
gameManager = gameManagerObject.GetComponent<CIVGameManager>();
mPresenter = gameManager.GetPresenter();
mGame = mPresenter.Game;
//mPlayers = mGame.Players;
}
else
{
Destroy(this);
}
}
void Update()
{
mProduction = mPresenter.Game.PlayerInTurn.Production;
mDeployment = mPresenter.Game.PlayerInTurn.Deployment;
switch (mPresenter.State)//for debug
{
case CivPresenter.Presenter.States.ProductUI:
{
SetManagementUI(true);
break;
}
case CivPresenter.Presenter.States.ProductAdd:
{
SetManagementUI(true);
break;
}
default:
SetManagementUI(false);
break;
}
}
public void MakeProductionQ()
{
List<GameObject> tempList = new List<GameObject>();
Debug.Log("ProductionList startMaking");
foreach (GameObject pq in PQlist)
{
Destroy(pq);
}
PQlist.Clear();
mProduction = mGame.PlayerInTurn.Production;
Debug.Log("ProList : " + mProduction.Count);
Debug.Log("ProductionList Updated");
foreach (Production prod in mProduction)
{
var PPrefab = Instantiate(proPrefab, new Vector3(0f, 0f, 0f), Quaternion.identity);
PPrefab.transform.SetParent(proQueue.transform);
PPrefab.transform.localScale = new Vector3(1f, 1f, 1f);
PPrefab.transform.localPosition = new Vector3(0f, 0f, 0f);
tempList.Add(PPrefab.GetComponent<ProPrefab>().MakeItem(prod));
}
if (mProduction.Count == 0)
{
Debug.Log("ProductionList null");
var PPrefab = Instantiate(proPrefab, new Vector3(0f, 0f, 0f), Quaternion.identity);
PPrefab.transform.SetParent(proQueue.transform);
PPrefab.transform.localScale = new Vector3(1f, 1f, 1f);
PPrefab.transform.localPosition = new Vector3(0f, 0f, 0f);
PPrefab.GetComponent<ProPrefab>().MakeItem();
tempList.Add(PPrefab);
}
PQlist = tempList;
}
public void MakeDeploymentQ()
{
List<GameObject> tempList = new List<GameObject>();
Debug.Log("DeploymentList startMaking");
foreach (GameObject dq in DQlist)
{
Destroy(dq);
}
DQlist.Clear();
mDeployment = mGame.PlayerInTurn.Deployment;
Debug.Log("DepList : " + mDeployment.Count);
Debug.Log("DeploymentList Updated");
foreach (Production prod in mDeployment)
{
var DPrefab = Instantiate(depPrefab, new Vector3(0f, 0f, 0f), Quaternion.identity);
DPrefab.transform.SetParent(depQueue.transform);
DPrefab.transform.localScale = new Vector3(1f, 1f, 1f);
DPrefab.transform.localPosition = new Vector3(0f, 0f, 0f);
tempList.Add(DPrefab.GetComponent<DepPrefab>().MakeItem(prod));
}
if (mDeployment.Count == 0)
{
Debug.Log("DeploymentList null");
var DPrefab = Instantiate(depPrefab, new Vector3(0f, 0f, 0f), Quaternion.identity);
DPrefab.transform.SetParent(depQueue.transform);
DPrefab.transform.localScale = new Vector3(1f, 1f, 1f);
DPrefab.transform.localPosition = new Vector3(0f, 0f, 0f);
tempList.Add(DPrefab.GetComponent<DepPrefab>().MakeItem());
tempList.Add(DPrefab);
}
DQlist = tempList;
}
public static void PrefabsSetting()
{
//ProPrefab.SetPresenter();
DepPrefab.SetPresenter();
SelPrefab.SetPresenter();
}
public static ManagementUIController GetManagementUIController()
{
if(managementUIController == null)
{
Debug.Log("managementUIController not made");
throw new MissingComponentException();
}
return managementUIController;
}
}
\ No newline at end of file
fileFormatVersion: 2 fileFormatVersion: 2
guid: 7e00ac4430b211b4992dbfe702a49536 guid: 7e00ac4430b211b4992dbfe702a49536
folderAsset: yes folderAsset: yes
timeCreated: 1517989383 timeCreated: 1518212165
licenseType: Free licenseType: Free
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using CivModel;
using CivModel.Common;
using CivPresenter;
public class DepPrefab : MonoBehaviour
{
private static Presenter presenter;
private static ManagementUIController uicontroller;
private Text[] textarguments;
private Image unitPrt;
private Button[] buttons;
// Use this for initialization
void Awake()
{
Debug.Log("call DepPre");
textarguments = gameObject.GetComponentsInChildren<Text>();
foreach (Image unt in gameObject.GetComponentsInChildren<Image>())
{
if (unt.name == "Portrait")
{
unitPrt = unt;
}
}
buttons = gameObject.GetComponentsInChildren<Button>();
}
void Start()
{
uicontroller = ManagementUIController.GetManagementUIController();
}
// Update is called once per frame
void Update()
{
}
public GameObject MakeItem(Production prod)
{
string nameofProduction = ProductionFactoryTraits.GetFactoryName(prod.Factory);
unitPrt.sprite = Resources.Load<Sprite>("Unit_portrait/" + nameofProduction + "_portrait");
foreach (Text txt in textarguments)
{
switch (txt.name)
{
case "UnitName":
txt.text = nameofProduction;
break;
}
}
return this.gameObject;
}
public GameObject MakeItem()
{
unitPrt.enabled = false;
foreach (Text txt in textarguments)
{
switch (txt.name)
{
case "UnitName":
txt.text = "비었음";
break;
}
}
return this.gameObject;
}
public void SetButton(int i)
{
foreach (Button but in buttons)
{
if (but.name == "Deploy")
{
but.onClick.AddListener(delegate () { DeployItem(i); });
}
}
}
public static void SetPresenter()
{
presenter = CIVGameManager.GetGameManager().GetComponent<CIVGameManager>().GetPresenter();
}
private void DeployItem(int i)
{
if (presenter.State == Presenter.States.ProductUI)
{
presenter.CommandNumeric(i);
presenter.CommandApply();
uicontroller.MakeProductionQ();
uicontroller.MakeDeploymentQ();
}
}
}
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using CivModel;
using CivModel.Common;
using CivPresenter;
public class ProPrefab : MonoBehaviour
{
//private static Presenter presenter;
private Text[] textarguments;
private Image unitPrt;
private Button[] buttons;
// Use this for initialization
void Awake()
{
Debug.Log("call ProPre");
textarguments = gameObject.GetComponentsInChildren<Text>();
foreach(Image unt in gameObject.GetComponentsInChildren<Image>())
{
if(unt.name == "Image")
{
unitPrt = unt;
}
}
}
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public GameObject MakeItem(Production prod)
{
string nameofProduction = ProductionFactoryTraits.GetFactoryName(prod.Factory);
unitPrt.sprite = Resources.Load<Sprite>("Unit_portrait/" + nameofProduction + "_portrait");
foreach (Text txt in textarguments)
{
switch(txt.name)
{
case "TurnsLeft":
txt.text = "?턴 이후 배치 가능.";
break;
case "UnitName":
txt.text = nameofProduction;
break;
case "GoldPer":
txt.text = "금 : 턴당 " + "?" + " (" + "?" + "/" + Convert.ToInt32(prod.TotalCost).ToString() + ")";
break;
case "LaborPer":
txt.text = "노동력 : 턴당 " + "?" + " (" + Convert.ToInt32(prod.LaborInputed).ToString() + "/" + Convert.ToInt32(prod.TotalCost).ToString() + ")";
break;
}
}
return this.gameObject;
}
public GameObject MakeItem()
{
unitPrt.enabled = false;
foreach (Text txt in textarguments)
{
switch (txt.name)
{
case "TurnsLeft":
txt.text = "비었음";
break;
case "UnitName":
txt.text = "B었음";
break;
}
}
return this.gameObject;
}
public void SetButton(int i)
{
}
/*public static void SetPresenter()
{
presenter = CIVGameManager.GetGameManager().GetComponent<CIVGameManager>().GetPresenter();
}*/
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using CivModel;
using CivModel.Common;
using CivPresenter;
public class SelPrefab : MonoBehaviour {
private static Presenter presenter;
private static ManagementUIController uicontroller;
private Text unitName;
private Image unitPrt;
private Text theNumberofProduce;
private Button[] buttons;
// Use this for initialization
void Awake () {
Debug.Log("call SelPre");
unitName = gameObject.GetComponentsInChildren<Text>()[1];
unitName.text = "초기";
foreach (Image unt in gameObject.GetComponentsInChildren<Image>())
{
if (unt.name == "Portrait")
{
unitPrt = unt;
}
}
buttons = gameObject.GetComponentsInChildren<Button>();
theNumberofProduce = gameObject.GetComponentsInChildren<Text>()[2];
}
void Start()
{
uicontroller = ManagementUIController.GetManagementUIController();
}
// Update is called once per frame
void Update () {
}
public GameObject MakeItem(IProductionFactory fact)
{
Debug.Log("Selection Queue Item Made");
string nameofFactory = ProductionFactoryTraits.GetFactoryName(fact);
unitPrt.sprite = Resources.Load<Sprite>("Unit_portrait/" + nameofFactory +"_portrait");
unitName.text = nameofFactory;
theNumberofProduce.text = "X 1";
return this.gameObject;
}
public GameObject MakeItem()
{
unitPrt.enabled = false;
Debug.Log("NULL Selection Queue");
unitName.text = "생산 가능 유닛 없음";
unitName.fontSize = 10;
theNumberofProduce.text = "";
return this.gameObject;
}
public void SetButton(int i)
{
foreach (Button but in buttons)
{
if (but.name == "Produce")
{
but.onClick.AddListener(delegate() { ProduceItem(i); });
}
}
}
public static void SetPresenter()
{
presenter = CIVGameManager.GetGameManager().GetComponent<CIVGameManager>().GetPresenter();
}
private void ProduceItem(int i)
{
if(presenter.State == Presenter.States.ProductUI)
{
presenter.CommandApply();
for(int k = 0; k < i; k++)
{
presenter.CommandArrowKey(Direction.Down);
}
presenter.CommandApply();
uicontroller.MakeProductionQ();
uicontroller.MakeDeploymentQ();
}
}
}
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1823663182664700}
m_IsPrefabParent: 1
--- !u!1 &1823663182664700
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4511157978174578}
- component: {fileID: 33704587241987444}
- component: {fileID: 23657486422157358}
m_Layer: 0
m_Name: hextile
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4511157978174578
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1823663182664700}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &23657486422157358
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1823663182664700}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 93b23d960c7fd2645bed567627e2e6db, type: 3}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &33704587241987444
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1823663182664700}
m_Mesh: {fileID: 4300000, guid: 93b23d960c7fd2645bed567627e2e6db, type: 3}
fileFormatVersion: 2
guid: f97ce35f32d75c648b7e56f79b6454c0
timeCreated: 1518211489
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment