// 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); }