Exemplo n.º 1
0
        ///<summary>
        /// Triggers on creatures with Pettable component when petted.
        ///</summary>
        ///<param name="performer">The player petting</param>
        public virtual void OnPetted(GameObject performer)
        {
            // face performer
            var dir = (performer.transform.position - transform.position).normalized;

            rotatable.SetFaceDirectionLocalVictor(dir.To2Int());
            PettedEvent?.Invoke();
        }
Exemplo n.º 2
0
        ///<summary>
        /// Triggers on creatures with Pettable component when petted.
        ///</summary>
        ///<param name="performer">The player petting</param>
        public virtual void OnPetted(GameObject performer)
        {
            // face performer
            var dir = (performer.transform.position - transform.position).normalized;

            directional.FaceDirection(Orientation.From(dir));
            PettedEvent?.Invoke();
        }
Exemplo n.º 3
0
    ///<summary>
    /// Triggers on creatures with Pettable component when petted.
    ///</summary>
    ///<param name="performer">The player petting</param>
    public virtual void OnPetted(GameObject performer)
    {
        // face performer
        var dir = (performer.transform.position - transform.position).normalized;

        dirSprites.ChangeDirection(dir);
        PettedEvent?.Invoke();
    }