Exemplo n.º 1
0
    private void Start()
    {
        appearance = GetComponent <UnitAppearance>();
        animations = GetComponent <UnitAnimations>();
        mover      = GetComponent <UnitMover>();
        physics    = GetComponent <UnitPhysics>();

        SubscribeToGlobalEvents();

        physics.SetCallbackForCollisionWithFinishPoint(OnColideWithFinishPoint);
        physics.SetCallbackForCollisionWithUnit(OnColideWithAnotherUnit);
        physics.SetCallbackForCollisionWithObstacle(OnColideWithObstacle);
    }
Exemplo n.º 2
0
        public async Task <RedirectToRouteResult> SetPublishTime(string courseId, string unitName, string publishTime)
        {
            var oldInfo = await db.Units.Where(u => u.CourseId == courseId && u.UnitName == unitName).ToListAsync();

            db.Units.RemoveRange(oldInfo);
            var unitAppearance = new UnitAppearance
            {
                CourseId    = courseId,
                UnitName    = unitName,
                UserName    = User.Identity.Name,
                PublishTime = DateTime.Parse(publishTime),
            };

            db.Units.Add(unitAppearance);
            await db.SaveChangesAsync();

            return(RedirectToAction("List", new { courseId }));
        }
Exemplo n.º 3
0
 private void _Init()
 {
     SaveLocations = new List<SaveLocation>(3); // always seen as 3 (1 for each difficulty - even if not applicable on the char yet)
     StateCodes1 = new List<Int32>();
     StateCodes2 = new List<Int32>();
     Bookmarks = new List<Bookmark>();
     Stats = new UnitObjectStats(FileManager, _debugOutputLoadingProgress);
     Items = new List<UnitObject>();
     Appearance = new UnitAppearance();
     Hotkeys = new List<Hotkey>();
     Position = new Vector3();
     Normal = new Vector3();
 }