Пример #1
0
    void Start()
    {
        actPart  = GetComponent <ActivityParticipation>();
        compAnim = gameObject.GetComponent <Animator>();

        //hero = GameObject.FindGameObjectWithTag("Player");
    }
Пример #2
0
    //[SerializeField] GameObject hero;
    //[SerializeField] GameObject sidekick = null;

    //Hero script references
    //StatsPlayer heroStats;

    //Sidekick script references
    //StatsPlayer sideStats;

    //Local participation bools
    //bool heroDidIt = false;
    //bool sideDidIt = false;


    private void Start()
    {
        mapManager = GameObject.Find("MapSceneManager").GetComponent <MapSceneManager>();
        actPart    = GetComponent <ActivityParticipation>();
        //hero = GameObject.FindGameObjectWithTag("Player");
        //heroStats = hero.GetComponent<StatsPlayer>();

        //sidekick = GameObject.FindGameObjectWithTag("Sidekick");
        //if (sidekick != null) {
        //sideStats = sidekick.GetComponent<StatsPlayer>();
        //}
    }
Пример #3
0
 public HomeViewModel(
     IActivityParticipationService activityParticipationService,
     IActivityManagementService activityManagementService,
     IEventParticipationService eventParticipationService,
     IEventManagementService eventManagementService)
 {
     _activityParticipationService = activityParticipationService;
     _activityManagementService    = activityManagementService;
     _eventParticipationService    = eventParticipationService;
     _eventManagementService       = eventManagementService;;
     NewEventParticipation         = new EventParticipation();
     NewActivityParticipation      = new ActivityParticipation();
 }
Пример #4
0
        public async Task SaveActivity()
        {
            NewActivityParticipation.Id           = Guid.NewGuid();
            NewActivityParticipation.PointsEarned = Math.Round(NewActivityParticipation.Minutes * 0.166666666667m);
            NewActivityParticipation.UserId       = Id;

            await _activityParticipationService.Create(NewActivityParticipation);

            SelectedRelativeIndex = (DateTimeOffset.UtcNow.Month - NewActivityParticipation.SubmissionDate.Month);

            await SetActivityParticipations();

            //clear out UI
            NewActivityParticipation = new ActivityParticipation();
        }
Пример #5
0
 public Task Create(ActivityParticipation activityParticipation)
 {
     return(_proxy.Create(activityParticipation));
 }