Jump to content

darkrurik

Registered
  • Posts

    3
  • Joined

  • Last visited

Everything posted by darkrurik

  1. hi I wanted a module in agis with atavism that passing 2 values to agis returned me the result will serve to start me working on agis thanks
  2. the thing I want to do is equal to crafting.HARVEST_RESOURCE but without animation and without being near a tree to hit it I just want the points Crafting.Instance.HarvestResource(resourceIDS); add points to the green line as in the attached image
  3. hello I created the possibility to add the points of the Skills via code as I can make them effective since when reboot game are lost thanks here’s how I did Skill playerSkill = Skills.Instance.PlayerSkills[enable ID]; playerSkill.exp = playerSkill.exp + 1;
  4. Resolve: TimeManager: using UnityEngine; using System.Collections; using System.Collections.Generic; public class TimeManager : MonoBehaviour { static TimeManager instance; public string timeGameObjectName; int day; int hour; int minute; float second = -1; int worldTimeSpeed = 1; string currentTime = ""; float delay = 3; float updateTime = -1; float lastFrameTime = -1; // Use this for initialization void Start () { instance = this; NetworkAPI.RegisterExtensionMessageHandler("server_time", ServerTimeMessage); } // Update is called once per frame void Update () { if (second == -1) return; // Recalculate the current time second += (Time.realtimeSinceStartup - lastFrameTime) * worldTimeSpeed; lastFrameTime = Time.realtimeSinceStartup; if (second >= 60) { int minutesPassed = (int)second / 60; second -= 60 * minutesPassed; minute += minutesPassed; if (minute >= 60) { minute -= 60; hour += 1; } if (hour >= 24) { hour -= 24; day += 1; } // Send out a time update message since the minute/hour has changed string[] args = new string[1]; AtavismEventSystem.DispatchEvent("WORLD_TIME_UPDATE", args); //Debug.Log("Time is now: " + hour + ":" + minute + " with deltaTime: " + Time.deltaTime + " and minutesPassed: " + minutesPassed); } if (timeGameObjectName != "" && updateTime != -1 && Time.time > updateTime) { GameObject timeReqGameObject = GameObject.Find(timeGameObjectName); if (timeReqGameObject != null) { timeReqGameObject.SendMessage("SetSecond", second); timeReqGameObject.SendMessage("SetMinute", minute); timeReqGameObject.SendMessage("SetHour", hour); timeReqGameObject.SendMessage("SetDay", day); } updateTime = -1; } } public void ServerTimeMessage(Dictionary props) { day = (int)props["day"]; hour = (int)props["hour"]; minute = (int)props["minute"]; second = (int)props["second"]; worldTimeSpeed = (int)props["worldTimeSpeed"]; //Debug.Log("Got Server Time Message with Day: " + day + ", hour: " + hour + ". minute: " + minute); lastFrameTime = Time.realtimeSinceStartup; updateTime = Time.time + delay; } public static TimeManager Instance { get { return instance; } } public string CurrentTime { get { return currentTime; } } public int Hour { get { return hour; } } public int Minute { get { return minute; } } public float Second { get { return second; } } public int Day { get { return day; } } } UGUIWorldTimeDisplayPersonal: using UnityEngine; using System; using UnityEngine.UI; using System.Collections; public class UGUIWorldTimeDisplayPersonal : MonoBehaviour { // public GameObject uniStormSystem; // public string day; // public int Month; // public int Year; // public string hour; // public string minute; // public string second; // public string timeText; // public string dateText; // void Awake() { // uniStormSystem = GameObject.Find("UniStormSystemEditor"); // } // // Use this for initialization // void Start () { // AtavismEventSystem.RegisterEvent("WORLD_TIME_UPDATE", this); // Month = System.DateTime.Now.Month; // Year = System.DateTime.Now.Year; // uniStormSystem.GetComponent().monthCounter = Month; // uniStormSystem.GetComponent().yearCounter = Year; // UpdateTimeDisplay(); // } // // Update is called once per frame // void Update() { // dateText = System.DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"); // UpdateTimeDisplay(); // } // void OnDestroy() { // AtavismEventSystem.UnregisterEvent("WORLD_TIME_UPDATE", this); // } // public void OnEvent(AtavismEventData eData) { // if (eData.eventType == "WORLD_TIME_UPDATE") { // UpdateTimeDisplay(); // } // } // void UpdateTimeDisplay() { // if (timeText != null) { // // Get time from the time system and set it to the text // hour = TimeManager.Instance.Hour.ToString(); // if (TimeManager.Instance.Hour < 10) { // hour = "0" + hour; // } // minute = TimeManager.Instance.Minute.ToString(); // if (TimeManager.Instance.Minute < 10) { // minute = "0" + minute; // } // second = TimeManager.Instance.Second.ToString(); // if (TimeManager.Instance.Second < 10) { // second = "0" + second; // } // day = TimeManager.Instance.Day.ToString(); // timeText = day + " / " + hour + ":" + minute + ":" + second; // //Hour = uniStormSystem.GetComponent().hourCounter; // uniStormSystem.GetComponent().dayCounter = TimeManager.Instance.Day; // uniStormSystem.GetComponent().hourCounter = TimeManager.Instance.Hour; // uniStormSystem.GetComponent().minuteCounter = TimeManager.Instance.Minute; // } // } // }
  5. MMODeveloper excuses I concern to the code that I want Sincronize to the put for managing the time in unistorm I don't find the file where I must put this code or I must create one file of mine we are to the version 2.3.1 thanks
  6. him however I am not satisfied at the most therefore I am interested to make even also a test with her with volcanic island if x contacts me email we can speak info@darkrurik.com
  7. him or already made to do an it isolates of the 4 that I wanted I am enough satisfied but not and perfect if I from an email explain her the everything
  8. him that is all right my problem and that not riusco to make 4 islands with terraincomposer2 and to put in every island one or + city connected from roads
  9. I look for graphic for to create terrestrial with Terrain Composer 2 in specific 4 islands will give you sketches of as I am now and it will need to create her with dimensions more elevated uniforms in the zones and connected by trade. 1) Mountains and Valleys Northerly 2) Volcanic Island South 3) Jungle East 4) Ices and crystals and Green Owest to build the territory 20000 Xs 10000 with angles to 12 degrees Ps: on the price it puts on us daccordo thanks http://unity.darkrurik.com/unitymaterials/disegni/area_1.png[/img] http://unity.darkrurik.com/unitymaterials/disegni/3f6e699a-f06b-49af-96cc-7b99bf60f1ac.jpg[/img] http://unity.darkrurik.com/unitymaterials/disegni/2016-01-21-23_12_36.jpg[/img]
  10. is world streamer able to be used for the 2.6 atavism version?
  11. ok how should I set the whole change in each file ui and put a variable that changes in that file or as cmq is designed so good in the update do not lose anything at most you change the parameters again You could give an example of how I have to do thanks
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.