Ejemplo n.º 1
0
    private void Awake()
    {
        mf = GetComponent <MouseFollower>();
        mf.SetDamp(false);

        ct = GetComponent <BoxAtomContainer>();
    }
Ejemplo n.º 2
0
    private void Awake()
    {
        if (Instance != null && Instance != this)
        {
            Debug.LogWarning("Instancia de box manager ya existe, borrando esta...", gameObject);
            Destroy(gameObject);
            return;
        }
        Instance = this;
        if (player == null || box == null)
        {
            Debug.LogWarning("Player o Box nulos!");
            return;
        }

        rayBox    = box.GetComponent <RayBox>();
        container = box.GetComponent <BoxAtomContainer>();

        life = player.GetComponent <LifeSystem>();
    }