Ejemplo n.º 1
0
    private void OnMouseDown()
    {
        if (phase == null)
        {
            return;
        }

        if (!phase.HaveRemainDrawingCount())
        {
            Debug.LogWarning("Not enough turn");
            return;
        }

        Debug.Log("조작모드 시작");
        isInControlMode     = true;
        currentLineStartPos = transform.position;
        RaycastTester raycastTester = gameObject.GetComponent <RaycastTester>();

        raycastTester.startPos = currentLineStartPos;
        currentLine            = Instantiate(linePrefab);
        currentLine.GetComponent <LineController>().player = player.GetComponent <Player>();
    }
Ejemplo n.º 2
0
    private Enemy EncountEnemy()
    {
        RaycastTester raycastTester = gameObject.GetComponent <RaycastTester>();

        return(raycastTester.GetNearestEnemy(ignoreList: allEncountedEnemyList));
    }
Ejemplo n.º 3
0
    private Vector2?EncountEnemyPosition()
    {
        RaycastTester raycastTester = gameObject.GetComponent <RaycastTester>();

        return(raycastTester.GetNearestEnemyPosition(ignoreList: allEncountedEnemyList));
    }