示例#1
0
        public CheckForTerrain_BlueprintData(CheckForTerrainCondition condition)
        {
            this.name = condition.transform.name;

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

            this.distance        = condition.distance;
            this.detectionMethod = condition.detectionMethod;
        }
示例#2
0
        public override void UnPack(GameObject target)
        {
            BaseBuilding building = target.GetComponentInParent <BaseBuilding>();

            if (building != null)
            {
                CheckForTerrainCondition condition = (CheckForTerrainCondition)building.CreateCondition(name, SocketPositionAnchor.Center, typeof(CheckForTerrainCondition));
                condition.transform.localPosition = (Vector3)position;
                condition.transform.localScale    = (Vector3)scale;
                condition.transform.localRotation = (Quaternion)rotation;

                condition.distance        = this.distance;
                condition.detectionMethod = this.detectionMethod;
            }
        }