Example #1
0
    protected override void Start()
    {
        base.Start();

        var comps = GetComponentInChildren<ItemPointScript>();
        if (comps == null)
            Debug.LogErrorFormat("No speak point defined for {0}! ", gameObject.name);
        else
        {
            SpeakerPoint = comps.GetPoint(Controller.CharacterZPosition);
        }
    }
Example #2
0
    protected override void Start()
    {
        base.Start();
        var comps = GetComponentInChildren<ItemPointScript>();
        if (comps == null)
            return;

        ObjectPoint = comps.GetPoint(Controller.CharacterZPosition);

        //we can have multiple itemUseOnScripts, so Destroy is definitelly not a good idea
        //  Destroy(comps);
    }
Example #3
0
    public static bool ArePointEqual(DirectionPoint a, DirectionPoint b)
    {
        if (ReferenceEquals(a, b))
        {
            return true;
        }

        // If one is null, but not both, return false.
        if (((object)a == null) || ((object)b == null))
        {
            return false;
        }

        // Return true if the fields match:
        return a.StartPoint == b.StartPoint && a.Direction == b.Direction;
    }
Example #4
0
    protected override void Start()
    {
        base.Start();

        var comps = GetComponentInChildren<ItemPointScript>();
        if (comps == null)
            Debug.LogErrorFormat("No object item point defined for {0}! ", gameObject.name);
        else
        {
            ObjectPoint = comps.GetPoint(Controller.CharacterZPosition);
            // we can  have multiple object trying to init using this point
            //Destroy(comps);
        }

        InspectController = GetComponent<InspectObjectController>();
        if (InspectController == null)
            Debug.LogErrorFormat("No InspectObjectController defined for {0}! ", gameObject.name);
    }