void SetShieldDirection( CharacterMovementView.ShieldDirection direction )
    {
        transform.localScale = Vector3.one;

        switch( direction )
        {
        case CharacterMovementView.ShieldDirection.Front:
            m_Renderer.sprite = VisualsFront;
            m_MovementView.SetSortingOrderOfShield( 150 );
            break;
        case CharacterMovementView.ShieldDirection.Back:
            m_Renderer.sprite = VisualsBack;
            m_MovementView.SetSortingOrderOfShield( 50 );
            break;
        case CharacterMovementView.ShieldDirection.Left:
            transform.localScale = new Vector3( -1, 1, 1 );
            m_Renderer.sprite = VisualsSide;
            m_MovementView.SetSortingOrderOfShield( 50 );
            break;
        case CharacterMovementView.ShieldDirection.Right:
            m_Renderer.sprite = VisualsSide;
            m_MovementView.SetSortingOrderOfShield( 150 );
            break;
        case CharacterMovementView.ShieldDirection.FrontHalf:
            m_Renderer.sprite = VisualsFrontHalf;
            m_MovementView.SetSortingOrderOfShield( 150 );
            break;
        case CharacterMovementView.ShieldDirection.BackHalf:
            m_Renderer.sprite = VisualsBackHalf;
            m_MovementView.SetSortingOrderOfShield( 50 );
            break;
        }
    }
예제 #2
0
 void Awake()
 {
     m_MovementModel    = GetComponent <CharacterMovementModel>();
     m_MovementView     = GetComponent <CharacterMovementView>();
     m_InteractionModel = GetComponent <CharacterInteractionModel>();
     m_pocketModel      = GetComponent <CharacterPocketModel>();
 }
 //Init all systems by finding their gamecomponent
 private void Awake()
 {
     m_MovementModel    = GetComponent <CharacterMovementModel>();
     m_MovementView     = GetComponent <CharacterMovementView>();
     m_InteractionModel = GetComponent <CharacterInteractionModel>();
     m_BombModel        = GetComponent <CharacterBombModel>();
 }
    public Inventory m_Inventory; //this is for debugging purposes

    void Awake()
    {
        m_MovementModel    = GetComponent <CharacterMovementModel>();
        m_MovementView     = GetComponent <CharacterMovementView>();
        m_InteractionModel = GetComponent <CharacterInteractionModel>();
        if (gameObject.tag == "Player")
        {
            m_AttackManager = GetComponentInChildren <AttackManager>();
        }
    }
예제 #5
0
    void Awake()
    {
        character = this;

        m_MovementModel       = MovementModel;
        m_InteractionModel    = InteractionModel;
        m_MovementView        = MovementView;
        m_InventoryModel      = InventoryModel;
        m_AttackableCharacter = AttackableCharacter;
        m_CharacterAudio      = AudioCharacter;
    }
 void Awake()
 {
     character          = GetComponent <Character>();
     m_MovementModel    = GetComponent <CharacterMovementModel>();
     m_MovementView     = GetComponent <CharacterMovementView>();
     m_InteractionModel = GetComponent <CharacterInteractionModel>();
     m_EquipmentModel   = GetComponents <EquipmentBaseModel>();
     holdTimers         = new float[3];
     canUse             = new bool[3] {
         true, true, true
     };
 }
예제 #7
0
 void Start()
 {
     m_Renderer     = GetComponentInChildren <SpriteRenderer>();
     m_MovementView = GetComponentInParent <CharacterMovementView>();
 }
예제 #8
0
 protected void Awake()
 {
     m_movementModel = GetComponent <CharacterMovementModel>();
     m_movementView  = GetComponent <CharacterMovementView>();
 }
 public void ForceShieldDirection( CharacterMovementView.ShieldDirection shieldDirection )
 {
     m_IsDirectionForced = true;
     m_ForcedDirection = shieldDirection;
 }
 void Start()
 {
     m_Renderer = GetComponentInChildren<SpriteRenderer>();
     m_MovementView = GetComponentInParent<CharacterMovementView>();
 }
 void Awake()
 {
     m_MovementModel = GetComponent<CharacterMovementModel>();
     m_MovementView = GetComponent<CharacterMovementView>();
     m_InteractionModel = GetComponent<CharacterInteractionModel>();
 }
예제 #12
0
 private void Awake()
 {
     MovementModel    = GetComponent <CharacterMovementModel>();
     MovementView     = GetComponent <CharacterMovementView>();
     InteractionModel = GetComponent <CharacterInteractionModel>();
 }