コード例 #1
0
        public void Copy(SpawnPointObject _point)
        {
            if (_point == null)
            {
                return;
            }

            base.Copy(_point);

            AccessType             = _point.AccessType;
            IsPrefab               = _point.IsPrefab;
            LevelDifference        = _point.LevelDifference;
            LevelDifferenceMaximum = _point.LevelDifferenceMaximum;
            SpawningRangeMax       = _point.SpawningRangeMax;
            SpawningRangeMin       = _point.SpawningRangeMin;
            SpawningRangeMaximum   = _point.SpawningRangeMaximum;
            SpawnPointGameObject   = _point.SpawnPointGameObject;

            UseRandomRect = _point.UseRandomRect;
        }
コード例 #2
0
        public Vector3 GetSpawnPosition()
        {
            Vector3 _position = Vector3.zero;

            if (ValidSpawnPoints.Count > 0)
            {
                SpawnPointObject _point = ValidSpawnPoints[Random.Range(0, ValidSpawnPoints.Count)];

                if (_point != null)
                {
                    _position = _point.GetSpawnPosition(BaseOffset);
                }
            }
            else if (ReferenceGameObject != null)
            {
                _position    = PositionTools.GetRandomPosition(ReferenceGameObject.transform.position, 25);
                _position.y += BaseOffset;
            }

            return(_position);
        }
コード例 #3
0
 public SpawnPointObject(SpawnPointObject _point) : base(_point)
 {
 }