public static void SetActionCode(CameraActionType actionType, SubCameraMotorType motorType, int id) { if (actionType == CameraActionType.Enter) { EnterAction[EnumToMask(CalcuMotorNum(motorType, id))] = true; } else if (actionType == CameraActionType.Leave) { LeaveAction[EnumToMask(CalcuMotorNum(motorType, id))] = true; } }
public static void CopyActionCode(CameraActionType type, int data) { if (type == CameraActionType.Enter) { EnterAction = new BitVector32(data); } else if (type == CameraActionType.Leave) { LeaveAction = new BitVector32(data); } }
public static void AddAction(CameraActionType actionType, SubCameraMotorType motorType, int motorId, Action <PlayerEntity, ICameraMotorState> act) { if (actionType == CameraActionType.Enter) { EnterActionList[CalcuMotorNum(motorType, motorId)] = act; } else if (actionType == CameraActionType.Leave) { LeaveActionList[CalcuMotorNum(motorType, motorId)] = act; } }
private static bool JudgeAction(CameraActionType type, int id) { if (type == CameraActionType.Enter) { return(EnterAction[EnumToMask(id)]); } else if (type == CameraActionType.Leave) { return(LeaveAction[EnumToMask(id)]); } return(false); }
public static int GetActionCode(CameraActionType type) { int result = 0; if (type == CameraActionType.Enter) { result = EnterAction.Data; } else if (type == CameraActionType.Leave) { result = LeaveAction.Data; } return(result); }
public void AddAction(CameraActionType actionType, SubCameraMotorType motorType, int motorId, Action <PlayerEntity, ICameraMotorState> act) { if (actionType == CameraActionType.Enter) { int index = CalcuMotorNum(motorType, motorId); if (!EnterActionList.ContainsKey(index)) { EnterActionList.Add(index, new List <Action <PlayerEntity, ICameraMotorState> >()); } var list = EnterActionList[index]; list.Add(act); } else if (actionType == CameraActionType.Leave) { int index = CalcuMotorNum(motorType, motorId); if (!LeaveActionList.ContainsKey(index)) { LeaveActionList.Add(index, new List <Action <PlayerEntity, ICameraMotorState> >()); } var list = LeaveActionList[index]; list.Add(act); } }