// Use this for initialization void Start() { // Get Flat Calendar Instance //获取平面日历实例 flatCalendar = GameObject.Find("FlatCalendar").GetComponent <FlatCalendar>(); // Initialize Flat Calendar //初始化平日历 flatCalendar.initFlatCalendar(); // Install Demo Event List //安装演示事件列表 flatCalendar.installDemoData(); // Add Events Callbacks //添加事件回调 flatCalendar.setCallback_OnDaySelected(dayUpdated); flatCalendar.setCallback_OnMonthChanged(monthUpdated); flatCalendar.setCallback_OnEventSelected(eventsDiscovered); flatCalendar.setCallback_OnNowday(backHome); // Set UI Style //设置UI样式 flatCalendar.setUIStyle(1); }
// Use this for initialization void Start() { // Get Flat Calendar Instance flatCalendar = GameObject.Find("FlatCalendar").GetComponent <FlatCalendar>(); // Initialize Flat Calendar flatCalendar.initFlatCalendar(); // Install Demo Event List flatCalendar.installDemoData(); // Add Events Callbacks flatCalendar.setCallback_OnDaySelected(dayUpdated); flatCalendar.setCallback_OnMonthChanged(monthUpdated); flatCalendar.setCallback_OnEventSelected(eventsDiscovered); flatCalendar.setCallback_OnNowday(backHome); // Set UI Style flatCalendar.setUIStyle(1); // Add Event Demo EventObj demoEvent = new EventObj("Event Name", "Event Description"); flatCalendar.addEvent(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, demoEvent); }
// ------------------------------------------- /* * Constructor */ public override void Initialize(params object[] _list) { double timestampDate = DateConverter.GetTimestamp(); if (_list.Length > 0) { if (_list[0] is string) { string bufferData = (string)_list[0]; if (bufferData.Length > 0) { if (!double.TryParse(bufferData, out timestampDate)) { timestampDate = DateConverter.GetTimestamp(); } } } } // INIT CALENDAR m_flatCalendar = GameObject.Find("FlatCalendar").GetComponent <FlatCalendar>(); m_myDateTime = DateConverter.TimeStampToDateTime(timestampDate); m_flatCalendar.initFlatCalendar(); m_flatCalendar.setCallback_OnDaySelected(DayUpdated); m_flatCalendar.setUIStyle(0); UIEventController.Instance.DelayUIEvent(UIEventController.EVENT_BASICEVENT_DELAYED_CALL, 0.01f, this.gameObject, "SetRequestDate"); UIEventController.Instance.UIEvent += new UIEventHandler(OnBasicEvent); }
// Use this for initialization void Start() { // Get Flat Calendar Instance flatCalendar = GameObject.Find("FlatCalendar").GetComponent <FlatCalendar>(); // Initialize Flat Calendar flatCalendar.initFlatCalendar(); // Install Demo Event List //flatCalendar.installDemoData(); // Add Events Callbacks flatCalendar.setCallback_OnDaySelected(dayUpdated); flatCalendar.setCallback_OnMonthChanged(monthUpdated); flatCalendar.setCallback_OnEventSelected(eventsDiscovered); flatCalendar.setCallback_OnNowday(backHome); // Set UI Style flatCalendar.setUIStyle(1); }