Ejemplo n.º 1
0
 protected override void Awake()
 {
     base.Awake();
     AI   = GetComponent <AIController>();
     Anim = GetComponent <Animator>();
     IC   = transform.Find("Indication Board").GetComponent <IndicationController>();
 }
Ejemplo n.º 2
0
    virtual protected void Awake()
    {
        transform.Find("Root").gameObject.layer = LayerMask.NameToLayer(CollisionLayer.KillingGround);
        Physics2D.IgnoreLayerCollision(LayerMask.NameToLayer(CollisionLayer.KillingGround), LayerMask.NameToLayer(CollisionLayer.Loot));
        rb                    = transform.GetComponent <Rigidbody2D>();
        IC                    = GetComponentInChildren <IndicationController>();
        VisualHolder          = transform.Find("Root/VisualHolder");
        MeleeAttackCollider_T = transform.Find("Root/MeleeAttackCollider");
        VFX_Transform         = transform.Find("Root/VFX");
        T_Buffs               = transform.Find("Root/Buffs");
        T_Debuffs             = transform.Find("Root/Debuffs");
        RootCollider          = transform.Find("Root").GetComponent <Collider2D>();

        CurrStats = new Stats();
        Actives   = new List <ActiveSkill>();
        Passives  = new List <PassiveSkill>();
    }
        public void GetIndications()
        {
            //Arrange
            List <Indication> indications = Indications.IndicationsList;

            var projectService = new Mock <IProjectService>();

            projectService.Setup(service => service.GetIndications())
            .Returns(indications);
            var controller = new IndicationController(projectService.Object);

            // Act
            var values = controller.GetIndications();
            var result = values.Result as OkObjectResult;


            //Assert
            Assert.Equal(200, result.StatusCode);
            Assert.Equal(indications, result.Value);
        }
Ejemplo n.º 4
0
    protected override void Awake()
    {
        base.Awake();

        //QualitySettings.vSyncCount = 0;
        //Application.targetFrameRate = 30;

        if (FirstWeapon != null)
        {
            FirstWeapon.GetComponent <EquipmentController>().InstantiateLoot(transform);
        }
        EquipPrefabs = new Dictionary <string, GameObject>();

        if (transform.parent.name == "MainPlayer")
        {
            if (ControllerManager.Instance)
            {
                CM = ControllerManager.Instance;
            }
            else
            {
                CM = FindObjectOfType <ControllerManager>();
            }
            if (SaveLoadManager.Instance)
            {
                SLM = SaveLoadManager.Instance;
            }
            else
            {
                SLM = FindObjectOfType <SaveLoadManager>();
            }
            PUIC       = transform.parent.Find("PlayerUI").GetComponent <PlayerUIController>();
            PlayerData = SLM.LoadPlayerInfo(SLM.SlotIndexToLoad);
        }
        IC       = transform.Find("Indication Board").GetComponent <IndicationController>();
        Actives  = transform.Find("Actives");
        Passives = transform.Find("Passives");
        InitPlayer();
    }