Skip to content

Commit

Permalink
[FCT] item sold discussion
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopheClaustre committed Dec 5, 2018
1 parent bc1ab8d commit fadae61
Show file tree
Hide file tree
Showing 4 changed files with 186 additions and 0 deletions.
67 changes: 67 additions & 0 deletions Assets/Animations/ManagementGeneral/Sold.anim
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Sold
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings: []
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 0.5
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves: []
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_GenerateMotionCurves: 0
m_Events:
- time: 0
functionName: ShowDiscussionBubble
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0
- time: 0.5
functionName: BeginDiscussion
data: Sold
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0
8 changes: 8 additions & 0 deletions Assets/Animations/ManagementGeneral/Sold.anim.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

100 changes: 100 additions & 0 deletions Assets/Scripts/Discussion/Sold.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
/***************************************************/
/*** INCLUDE ************************/
/***************************************************/
using UnityEngine;
using System.Collections;
using System.Collections.Generic;

/***************************************************/
/*** THE CLASS ************************/
/***************************************************/
public class Sold :
MonoBehaviour
{
#region Sub-classes/enum
/***************************************************/
/*** SUB-CLASSES/ENUM ************************/
/***************************************************/

/******** PUBLIC ************************/

/******** PROTECTED ************************/

/******** PRIVATE ************************/

#endregion
#region Property
/***************************************************/
/*** PROPERTY ************************/
/***************************************************/



#endregion
#region Constants
/***************************************************/
/*** CONSTANTS ************************/
/***************************************************/



#endregion
#region Attributes
/***************************************************/
/*** ATTRIBUTES ************************/
/***************************************************/

Discussions.Discussion[] m_discussion =
{
new Discussions.Discussion( Discussions.Who.eGrandpa, "At this price I can buy it." ),
new Discussions.Discussion( Discussions.Who.eYou, "Thank you. Have a nice day." ),
};

int m_round = 0;

#endregion
#region Methods
/***************************************************/
/*** METHODS ************************/
/***************************************************/

/******** UNITY MESSAGES ************************/

// Use this for initialization
private void Start()
{

}

// Update is called once per frame
private void Update()
{

}

/******** OUR MESSAGES ************************/

/******** PUBLIC ************************/

public void NextSold()
{
if (m_round >= m_discussion.Length)
Discussions.Inst.EndDiscussion();
else
{
Discussions.Inst.ChangeText(m_discussion[m_round]);
m_round++;
}
}

public void BeginSold()
{
m_round = 0;
}

/******** PROTECTED ************************/

/******** PRIVATE ************************/

#endregion
}
11 changes: 11 additions & 0 deletions Assets/Scripts/Discussion/Sold.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fadae61

Please sign in to comment.