using System.Collections; using System.Collections.Generic; using UnityEngine; public class EventSystem : MonoBehaviour { public void EventID(int ID,float maxLenght,ref float lenght,ref int speed,ref int moveTime,ref int points,ref float pointsRatio) { switch (ID) { case 11001111: lenght = maxLenght; break; case 11001121: speed += JsonTab.Instance.tables.Eventtype.Get(ID).Event1; break; case 11001131: moveTime += JsonTab.Instance.tables.Eventtype.Get(ID).Event1; break; case 11001141: pointsRatio += JsonTab.Instance.tables.Eventtype.Get(ID).Event1; break; case 11001151: var intSpeed0 = (float)speed * (((float)JsonTab.Instance.tables.Eventtype.Get(ID).Event1) / 100); speed -= (int)intSpeed0; points += JsonTab.Instance.tables.Eventtype.Get(ID).Event2; break; case 11001161: var intSpeed1 = (float)speed * (((float)JsonTab.Instance.tables.Eventtype.Get(ID).Event1) / 100); speed -= (int)intSpeed1; pointsRatio += JsonTab.Instance.tables.Eventtype.Get(ID).Event2; break; case 11001171: moveTime -= JsonTab.Instance.tables.Eventtype.Get(ID).Event1; points += JsonTab.Instance.tables.Eventtype.Get(ID).Event2; break; case 11001181: moveTime -= JsonTab.Instance.tables.Eventtype.Get(ID).Event1; pointsRatio += JsonTab.Instance.tables.Eventtype.Get(ID).Event2; break; } } }