Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="buildingRequestment"></param>
        /// <returns></returns>
        private Vector3 CalculatePosition(BuildingRequestment buildingRequestment)
        {
            //buildingRequestment.index;


            return(new Vector3(0, 0, 0));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 주문에 맞춰 Building Prefab을 생성한다.
        /// </summary>
        /// <param name="buildingRequestment"></param>
        /// <returns></returns>
        public GameObject CreateBuilding(BuildingRequestment buildingRequestment)
        {
            GameObject building      = _bm.Find(buildingRequestment.name);
            var        slotTransform = buildingRequestment.owner.Slots[buildingRequestment.index].transform;

            return(Instantiate(building, slotTransform.position, slotTransform.rotation, buildingRequestment.owner.transform) as GameObject);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Buliding을 생성하는 곳
        /// </summary>
        /// <param name="buildingComponent"></param>
        /// <param name="owner"></param>
        /// <param name="position"></param>
        /// <returns></returns>
        public Buildable CreateBuilding(BuildingRequestment requestment, Vector3 position)
        {
            //return Building
            _super.gameObject.SetActive(false);

            var building = SimplePool.Spawn(_super, position).GetComponent <Buildable>();

            building._activated       = false;
            building.Owner            = requestment.owner;
            building.transform.parent = requestment.owner.transform;
            building.gameObject.SetActive(true); // OnEnable이 호출되는 순서를 제어하기 위함

            return(building);
        }
Ejemplo n.º 4
0
 public Buildable CreateBuilding(BuildingRequestment requestment)
 {
     //return Building
     return(CreateBuilding(requestment, requestment.owner.transform.position));
 }
Ejemplo n.º 5
0
 public void DestroyBuilding(BuildingRequestment buildingRequestment)
 {
 }
Ejemplo n.º 6
0
 public GameObject UpgradeBuilding(BuildingRequestment buildingRequestment)
 {
     return(null);
 }