예제 #1
0
        public ActionPoint SpawnActionPoint(IO.Swagger.Model.ProjectActionPoint apData, IActionPointParent actionPointParent)
        {
            Debug.Assert(apData != null);
            GameObject AP;

            if (actionPointParent == null)
            {
                AP = Instantiate(ActionPointPrefab, ActionPointsOrigin.transform);
            }
            else
            {
                AP = Instantiate(ActionPointPrefab, actionPointParent.GetTransform());
            }

            AP.transform.localScale = new Vector3(1f, 1f, 1f);
            ActionPoint actionPoint = AP.GetComponent <ActionPoint>();

            actionPoint.InitAP(apData, APSize, actionPointParent);
            ActionPoints.Add(actionPoint.Data.Id, actionPoint);

            return(actionPoint);
        }