// Use this for initialization void Start() { player = GameObject.Find("Player"); playerScript = player.GetComponent <ControlWithMouse> (); painter = GameObject.Find("Painter"); GetEventTextXML(); fadeInOut = GameObject.Find("FadeInOut"); }
public override bool Use() //Igual lo hacemos pubico para mejorar la interaccion con el personaje //objectiveDoor.SendMessage("Activate"); { originalPosition = transform.position; player = GameObject.Find("Player"); playerScript = player.GetComponent <ControlWithMouse> (); playerScript.SetEventStatus(); transform.position = player.transform.position + positionOverThePlayer; fallingPaint = Instantiate(fallingPaintPrefab, player.transform.position, Quaternion.identity); Vector3 stainPostion = new Vector3(0.0f, -0.9f, 0.0f); Instantiate(paintStainPrefab, player.transform.position + stainPostion, Quaternion.identity); triggered = true; return(true); }