Esempio n. 1
0
    //[SerializeField] GameObject hero;
    //[SerializeField] GameObject sidekick = null;

    //Hero script references
    //StatsPlayer heroStats;

    //Sidekick script references
    //StatsPlayer sideStats;

    //Local participation bools
    //bool heroDidIt = false;
    //bool sideDidIt = false;


    private void Start()
    {
        mapManager = GameObject.Find("MapSceneManager").GetComponent <MapSceneManager>();
        actPart    = GetComponent <ActivityParticipation>();
        //hero = GameObject.FindGameObjectWithTag("Player");
        //heroStats = hero.GetComponent<StatsPlayer>();

        //sidekick = GameObject.FindGameObjectWithTag("Sidekick");
        //if (sidekick != null) {
        //sideStats = sidekick.GetComponent<StatsPlayer>();
        //}
    }
Esempio n. 2
0
    void Awake()
    {
        instance = this;

        terrainMap = TerrainMapController.instance.tilemap;

        Pathfinder.Initialize(terrainMap);

        unitManager      = GetComponent <MapUnitManager>();
        resourceManager  = GetComponent <MapResourceManager>();
        castleManager    = GetComponent <MapCastleManager>();
        cameraController = GetComponent <MapSceneCameraController>();
    }
Esempio n. 3
0
    public void SaveMapUnits(MapSceneManager manager)
    {
        List <MapUnit> castleSaveUnits = new List <MapUnit>();

        foreach (var unit in manager.castleManager.castles.Values)
        {
            //if unit is in range of the castle
            castleSaveUnits.Add(unit);
        }

        mapResources = manager.resourceManager.resources.Select(resource => resource.Save()).ToArray();

        Save();
    }
Esempio n. 4
0
    void FinishActivity()
    {
        if (MapSceneManager.currentLocation == MapSceneManager.mapLoc && NodeDetails.myHighTierActivity != null &&
            NodeDetails.myHighTierActivity != "" && NodeDetails.myHighTierActivity != "Blank")
        {
            MapSceneManager.ResetHighTier();
        }

        //Display "activity completion" UI menu
        completionDisplay.GetComponent <Animator>().SetBool("compActivated", true);

        //Add the gainedNotoriety total to the player's notoriety stat and display both amounts
        StatsPlayer.notoriety += gainedNotoriety;
        string gainedOrLost = ((gainedNotoriety >= 0) ? "Notoriety gained: " : "Notoriety lost: ");

        notorietyText.text = (gainedOrLost + gainedNotoriety + " || Total: " + StatsPlayer.notoriety);
    }