Esempio n. 1
0
    // Initial connection.
    void Start()
    {
        // Initialise map feature managers.
        obstacleManager    = new ObstacleManager();
        scorePointManager  = new ScorePointManager();
        healthPointManager = new HealthPointManager();
        pickupManager      = new PickupManager();

        // Initialise dictionary.
        mapFeatureManagers = new Dictionary <string, MapFeatureManager>();
        mapFeatureManagers.Add(mapFeatureNames[0], obstacleManager);
        mapFeatureManagers.Add(mapFeatureNames[1], scorePointManager);
        mapFeatureManagers.Add(mapFeatureNames[2], healthPointManager);
        mapFeatureManagers.Add(mapFeatureNames[3], pickupManager);

        // Initialise player manager.
        playerManager = new PlayerManager();

        if (Application.platform == RuntimePlatform.WebGLPlayer)
        {
            // Ask the browsers for setup calls.
            // (See unity.html for clarifications.)
            Debug.Log("Sending message to WebGLPlayer.");
            Application.ExternalCall("SendAllConnect");
        }
        else
        {
            // TEMPORARY. Just for testing. Connect directly. Assume id = 1.
            EstablishConnection();
            SetUserId(1);
        }

        startTime = Time.time;
        dataQueue = new Queue <JSONNode>();
    }
        public void setUp()
        {
            MapperConfiguration mapperConfiguration = new MapperConfiguration(cfg =>
            {
                cfg.AddProfile(new MappingProfile());
            });

            _mapper = mapperConfiguration.CreateMapper();


            _healthPointManagerDomain = new HealthPointManager();
            _HealthPointManager       = new Models.FicheModel.HealthPointManager()
            {
                PvActuel = 0, PvMax = 0, PvTemporaire = 0, DesDeVie = 0
            };
        }
Esempio n. 3
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     //if (other.CompareTag("Player"))
     //{
     //    // spawn the sun button at the first available inventory slot !
     //    for (int i = 0; i < inventory.slots.Length; i++)
     //    {
     //        if (inventory.isFull[i] == false)
     //        { // check whether the slot is EMPTY
     //            inventory.isFull[i] = true; // makes sure that the slot is now considered FULL
     //            inventory.destroyedObj[inventory.numberOfDestroyedObj] = gameObject.name;
     //            inventory.numberOfDestroyedObj++;
     //            Instantiate(itemButton, inventory.slots[i].transform, false); // spawn the button so that the player can interact with it
     //            Destroy(gameObject);
     //            break;
     //        }
     //    }
     //}
     HealthPointManager.AddHealthPoints(healthPointsToAdd);
     Destroy(gameObject);
 }
Esempio n. 4
0
        public FicheDomain()
        {
            IdJoueur        = "";
            Equipement      = "";
            CapaciteEtTrait = "";
            Note            = "";
            Inspiration     = false;

            //Instanciation des liste (vide par défaut)
            Sorts       = new List <Sort>();
            Attaques    = new List <Attaque>();
            Competences = new List <Competence>();


            BasicInfo          = new BasicCharacterInfo();
            HpManager          = new HealthPointManager();
            SaveRolls          = new SaveRollManager();
            DeathRolls         = new DeathRollManager();
            Wallet             = new MoneyManager();
            BackgroundAndTrait = new PersonalityAndBackground();
            Masteries          = new CharacterMasteries();
            Caracteristics     = new CaracteristicsManager();
            Status             = new CharacterStatus();
        }
Esempio n. 5
0
 void OnTriggerEnter2D(Collider2D obj)
 {
     Debug.Log(1);
     HealthPointManager.DeductHealthPoint(healthPointsToDeduct);
 }
Esempio n. 6
0
 public void Use()
 {
     HealthPointManager.AddHealthPoints(healthPointsToAdd);
     Destroy(gameObject);
 }