예제 #1
0
        public CheckForGround_BlueprintData(CheckForGroundCondition condition)
        {
            this.name = condition.transform.name;

            this.position = condition.transform.localPosition;
            this.rotation = condition.transform.localRotation;
            this.scale    = condition.transform.localScale;

            this.destroyDelay = condition.destroyDelay;
        }
예제 #2
0
        public override void UnPack(GameObject target)
        {
            BaseBuilding building = target.GetComponentInParent <BaseBuilding>();

            if (building != null)
            {
                CheckForGroundCondition condition = (CheckForGroundCondition)building.CreateCondition(name, SocketPositionAnchor.Center, typeof(CheckForGroundCondition));

                condition.transform.localPosition = (Vector3)position;
                condition.transform.localScale    = (Vector3)scale;
                condition.transform.localRotation = (Quaternion)rotation;

                condition.destroyDelay = this.destroyDelay;
            }
        }