Пример #1
0
        public RoadTripMagnitudeResult GetRoadTripMagnitude(Node node)
        {
            RoadTripMagnitudeResult result;

            if (Magnitudes.TryGetValue(node, out result))
            {
                return(result);
            }

            result = new RoadTripMagnitudeResult()
            {
                Magnitude = 0
            };

            foreach (var neighbor in node.Neighbors)
            {
                int neighborPopulation = GetPopulation(neighbor, node);

                if (neighborPopulation > result.Magnitude)
                {
                    result.Node      = neighbor;
                    result.Magnitude = neighborPopulation;
                }
            }

            Magnitudes.Add(node, result);

            return(result);
        }
Пример #2
0
 public FXEarthquake(GameObject target, Magnitudes magnitude, float range)
 {
     this.Target    = target;
     this.Type      = Types.EARTHQUAKE;
     this.magnitude = magnitude;
     this.pivot     = target.transform.position;
     this.range     = range;
     this.couter    = 0;
 }
Пример #3
0
 public FXEarthquake(GameObject target, Magnitudes magnitude, float range)
 {
     this.Target = target;
     this.Type = Types.EARTHQUAKE;
     this.magnitude = magnitude;
     this.pivot = target.transform.position;
     this.range = range;
     this.couter = 0;
 }