コード例 #1
0
    public override string ToString()
    {
        string ret = string.Format("Impact Tile: {0} Dir: {1} Dam: {2} DMod: {3} PDist: {4}",
                                   ImpactedTile.ToString(), ImpactDirection.ToString(), Damage.ToString(), DirectionalMod.ToString(), PushDistance.ToString());

        return(ret);
    }
コード例 #2
0
    private void ChangeWindDirectionAndSpeed(HexDirection newDirection, WindStrength newWindStrength)
    {
        Material ocean = Resources.Load <Material>("Materials/Water");

        ocean.DisableKeyword("_WATERDIRECTION_NE");
        ocean.DisableKeyword("_WATERDIRECTION_E");
        ocean.DisableKeyword("_WATERDIRECTION_SE");
        ocean.DisableKeyword("_WATERDIRECTION_SW");
        ocean.DisableKeyword("_WATERDIRECTION_W");
        ocean.DisableKeyword("_WATERDIRECTION_NW");

        ocean.EnableKeyword($"_WATERDIRECTION_{newDirection.ToString()}");

        ocean.SetFloat("_Speed", windSpeeds[(int)newWindStrength]);

        windStrength  = newWindStrength;
        windDirection = newDirection;
        OnWindChanged?.Invoke(newDirection, (int)newWindStrength);

        Debug.Log($"Wind is now {newWindStrength} in the {newDirection} direction");
    }
コード例 #3
0
ファイル: HexNode.cs プロジェクト: v-free/hexMap
 public override string ToString()
 {
     return(X + ", " + Z + " | Direction = " + direction.ToString());
 }