コード例 #1
0
ファイル: Feature.cs プロジェクト: acpirate/hexrogue
    Location myLocation; //make into location object

    #endregion Fields

    #region Constructors

    public Feature(FEATURETYPE inType, string inName, Location inLocation)
    {
        featureType=inType;
        featureName=inName;
        myLocation=inLocation;

        //if (!(userinterfaceHolder)) userinterfaceHolder=GameObject.Find("UserInterface");
    }
コード例 #2
0
ファイル: Location.cs プロジェクト: acpirate/hexrogue
    public void addFeature(FEATURETYPE featureToAdd)
    {
        switch (featureToAdd) {

            case FEATURETYPE.STAIRSDOWN:
                feature=new Feature(featureToAdd,
                                    "stairsdown",
                                    this);
            break;
            case FEATURETYPE.STAIRSUP:
                feature=new Feature(featureToAdd,
                                    "stairsup",
                                    this);
            break;

        }
    }
コード例 #3
0
ファイル: DungeonCode.cs プロジェクト: acpirate/hexrogue
    public Location getLocationOfFeature(int level, FEATURETYPE featureLocationToGet)
    {
        List<Location> locations=getAllLevelLocations(level);

            Location tempLocation=null;

            foreach(Location location in locations) {
                if (location.getFeature()!=null && location.getFeature().getFeatureType()==featureLocationToGet) {
                    tempLocation=location;
                    break;
                }
            }

            return tempLocation;
    }
コード例 #4
0
ファイル: DisplayCode.cs プロジェクト: acpirate/hexrogue
    public GameObject getDisplayObject(FEATURETYPE feature)
    {
        GameObject tempGameObject=null;

        switch (feature) {

        case FEATURETYPE.STAIRSDOWN:
            tempGameObject=(GameObject) Instantiate(stairsdown);
            break;
        case FEATURETYPE.STAIRSUP:
            tempGameObject=(GameObject) Instantiate(stairsup);
            break;
        }

        return tempGameObject;
    }